1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-08 17:48:06 +11:00
collapseos/emul/z80/sms/kbd.h
Virgil Dupras efe4b13a4e Move /emul to /emul/z80
I'm planning on adding other subfolders. 8086 for example...
2020-10-24 16:50:22 -04:00

17 lines
406 B
C

#include <stdint.h>
#include <stdbool.h>
#include "port.h"
#define KBD_BUFSZ 0x10
typedef struct {
uint8_t kc; // last keycode to be pressed. 0 means none.
bool breaking; // whether we should send 0xf0 before kc
Tristate *TH;
} Kbd;
void kbd_init(Kbd *kbd, Tristate *TH);
void kbd_pressshift(Kbd *kbd, bool ispressed);
void kbd_presskey(Kbd *kbd, uint8_t keycode);
uint8_t kbd_rd(Kbd *kbd);