4 #include "chardev/char-fe.h"
5 #include "chardev/char-serial.h"
8 #include "qom/object.h"
11 #define TYPE_ESCC "escc"
14 typedef struct ESCCState ESCCState
;
15 DECLARE_INSTANCE_CHECKER(ESCCState
, ESCC
,
19 escc_chn_a
, escc_chn_b
,
23 escc_serial
, escc_kbd
, escc_mouse
,
26 #define ESCC_SERIO_QUEUE_SIZE 256
29 uint8_t data
[ESCC_SERIO_QUEUE_SIZE
];
30 int rptr
, wptr
, count
;
33 #define ESCC_SERIAL_REGS 16
34 typedef struct ESCCChannelState
{
36 uint32_t rxint
, txint
, rxint_under_svc
, txint_under_svc
;
37 struct ESCCChannelState
*otherchn
;
39 uint8_t wregs
[ESCC_SERIAL_REGS
], rregs
[ESCC_SERIAL_REGS
];
42 int e0_mode
, led_mode
, caps_lock_mode
, num_lock_mode
;
45 uint32_t vmstate_dummy
;
46 ESCCChnID chn
; /* this channel, A (base+4) or B (base+0) */
49 QemuInputHandlerState
*hs
;
53 SysBusDevice parent_obj
;
55 struct ESCCChannelState chn
[2];