-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathserial.h
64 lines (48 loc) · 963 Bytes
/
serial.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
enum {
KB_CTR = (1 << 3),
KB_CTRMASK = (KB_CTR - 1),
KB_BUF = (1 << 7),
KB_BUFMASK = (KB_BUF - 1)
};
typedef struct {
UINT32 xferclock;
UINT8 data;
UINT8 cmd;
UINT8 mode;
UINT8 status;
UINT ctrls;
UINT ctrpos;
UINT buffers;
UINT bufpos;
UINT8 ctr[KB_CTR];
UINT8 buf[KB_BUF];
} _KEYBRD, *KEYBRD;
typedef struct {
UINT8 result;
UINT8 data;
UINT8 send;
UINT8 pad;
UINT pos;
UINT dummyinst;
UINT mul;
} _RS232C, *RS232C;
#ifdef __cplusplus
extern "C" {
#endif
void keyboard_callback(NEVENTITEM item);
void keyboard_reset(const NP2CFG *pConfig);
void keyboard_bind(void);
void keyboard_resetsignal(void);
void keyboard_ctrl(REG8 data);
void keyboard_send(REG8 data);
void rs232c_construct(void);
void rs232c_destruct(void);
void rs232c_reset(const NP2CFG *pConfig);
void rs232c_bind(void);
void rs232c_open(void);
void rs232c_callback(void);
UINT8 rs232c_stat(void);
void rs232c_midipanic(void);
#ifdef __cplusplus
}
#endif