]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/hw/char/escc.h
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
[mirror_qemu.git] / include / hw / char / escc.h
index 42aca83611023467edf9a389c2a2a49a7f991793..7e9482dee2be4f8dfefad5442597cd8c27c07fc7 100644 (file)
@@ -3,13 +3,15 @@
 
 #include "chardev/char-fe.h"
 #include "chardev/char-serial.h"
+#include "hw/sysbus.h"
 #include "ui/input.h"
+#include "qom/object.h"
 
 /* escc.c */
 #define TYPE_ESCC "escc"
 #define ESCC_SIZE 4
 
-#define ESCC(obj) OBJECT_CHECK(ESCCState, (obj), TYPE_ESCC)
+OBJECT_DECLARE_SIMPLE_TYPE(ESCCState, ESCC)
 
 typedef enum {
     escc_chn_a, escc_chn_b,
@@ -45,14 +47,15 @@ typedef struct ESCCChannelState {
     QemuInputHandlerState *hs;
 } ESCCChannelState;
 
-typedef struct ESCCState {
+struct ESCCState {
     SysBusDevice parent_obj;
 
     struct ESCCChannelState chn[2];
     uint32_t it_shift;
+    bool bit_swap;
     MemoryRegion mmio;
     uint32_t disabled;
     uint32_t frequency;
-} ESCCState;
+};
 
 #endif