2 * QEMU LASI PS/2 emulation
4 * Copyright (c) 2019 Sven Schnelle
10 * + sysbus MMIO region 0: MemoryRegion defining the LASI PS2 keyboard
12 * + sysbus MMIO region 1: MemoryRegion defining the LASI PS2 mouse
14 * + sysbus IRQ 0: LASI PS2 output irq
15 * + Named GPIO input "lasips2-port-input-irq[0..1]": set to 1 if the downstream
16 * LASIPS2Port has asserted its irq
19 #ifndef HW_INPUT_LASIPS2_H
20 #define HW_INPUT_LASIPS2_H
22 #include "exec/hwaddr.h"
23 #include "hw/sysbus.h"
24 #include "hw/input/ps2.h"
26 #define TYPE_LASIPS2_PORT "lasips2-port"
27 OBJECT_DECLARE_TYPE(LASIPS2Port
, LASIPS2PortDeviceClass
, LASIPS2_PORT
)
29 struct LASIPS2PortDeviceClass
{
32 DeviceRealize parent_realize
;
35 typedef struct LASIPS2State LASIPS2State
;
38 DeviceState parent_obj
;
40 LASIPS2State
*lasips2
;
50 #define TYPE_LASIPS2_KBD_PORT "lasips2-kbd-port"
51 OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2KbdPort
, LASIPS2_KBD_PORT
)
53 struct LASIPS2KbdPort
{
54 LASIPS2Port parent_obj
;
59 #define TYPE_LASIPS2_MOUSE_PORT "lasips2-mouse-port"
60 OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2MousePort
, LASIPS2_MOUSE_PORT
)
62 struct LASIPS2MousePort
{
63 LASIPS2Port parent_obj
;
69 SysBusDevice parent_obj
;
71 LASIPS2KbdPort kbd_port
;
72 LASIPS2MousePort mouse_port
;
77 #define TYPE_LASIPS2 "lasips2"
78 OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2State
, LASIPS2
)
80 #endif /* HW_INPUT_LASIPS2_H */