diff options
Diffstat (limited to 'hw/display/ads7846.c')
-rw-r--r-- | hw/display/ads7846.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c index 56bf82fe07..4b87ee7135 100644 --- a/hw/display/ads7846.c +++ b/hw/display/ads7846.c @@ -16,8 +16,9 @@ #include "migration/vmstate.h" #include "qemu/module.h" #include "ui/console.h" +#include "qom/object.h" -typedef struct { +struct ADS7846State { SSISlave ssidev; qemu_irq interrupt; @@ -27,10 +28,12 @@ typedef struct { int cycle; int output; -} ADS7846State; +}; +typedef struct ADS7846State ADS7846State; #define TYPE_ADS7846 "ads7846" -#define ADS7846(obj) OBJECT_CHECK(ADS7846State, (obj), TYPE_ADS7846) +DECLARE_INSTANCE_CHECKER(ADS7846State, ADS7846, + TYPE_ADS7846) /* Control-byte bitfields */ #define CB_PD0 (1 << 0) |