qemu

FORK: QEMU emulator
git clone https://git.neptards.moe/neptards/qemu.git
Log | Files | Refs | Submodules | LICENSE

pl050.h (1112B)


      1 /*
      2  * Arm PrimeCell PL050 Keyboard / Mouse Interface
      3  *
      4  * Copyright (c) 2006-2007 CodeSourcery.
      5  * Written by Paul Brook
      6  *
      7  * This code is licensed under the GPL.
      8  */
      9 
     10 #ifndef HW_PL050_H
     11 #define HW_PL050_H
     12 
     13 #include "qemu/osdep.h"
     14 #include "hw/sysbus.h"
     15 #include "migration/vmstate.h"
     16 #include "hw/input/ps2.h"
     17 #include "hw/irq.h"
     18 
     19 struct PL050DeviceClass {
     20     SysBusDeviceClass parent_class;
     21 
     22     DeviceRealize parent_realize;
     23 };
     24 
     25 #define TYPE_PL050 "pl050"
     26 OBJECT_DECLARE_TYPE(PL050State, PL050DeviceClass, PL050)
     27 
     28 struct PL050State {
     29     SysBusDevice parent_obj;
     30 
     31     MemoryRegion iomem;
     32     PS2State *ps2dev;
     33     uint32_t cr;
     34     uint32_t clk;
     35     uint32_t last;
     36     int pending;
     37     qemu_irq irq;
     38     bool is_mouse;
     39 };
     40 
     41 #define TYPE_PL050_KBD_DEVICE "pl050_keyboard"
     42 OBJECT_DECLARE_SIMPLE_TYPE(PL050KbdState, PL050_KBD_DEVICE)
     43 
     44 struct PL050KbdState {
     45     PL050State parent_obj;
     46 
     47     PS2KbdState kbd;
     48 };
     49 
     50 #define TYPE_PL050_MOUSE_DEVICE "pl050_mouse"
     51 OBJECT_DECLARE_SIMPLE_TYPE(PL050MouseState, PL050_MOUSE_DEVICE)
     52 
     53 struct PL050MouseState {
     54     PL050State parent_obj;
     55 
     56     PS2MouseState mouse;
     57 };
     58 
     59 #endif