aboutsummaryrefslogtreecommitdiff
path: root/hw/display/ssd0303.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/ssd0303.c')
-rw-r--r--hw/display/ssd0303.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/display/ssd0303.c b/hw/display/ssd0303.c
index 718378f6de..0378573a42 100644
--- a/hw/display/ssd0303.c
+++ b/hw/display/ssd0303.c
@@ -16,6 +16,7 @@
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "ui/console.h"
+#include "qom/object.h"
//#define DEBUG_SSD0303 1
@@ -46,9 +47,11 @@ enum ssd0303_cmd {
};
#define TYPE_SSD0303 "ssd0303"
-#define SSD0303(obj) OBJECT_CHECK(ssd0303_state, (obj), TYPE_SSD0303)
+typedef struct ssd0303_state ssd0303_state;
+DECLARE_INSTANCE_CHECKER(ssd0303_state, SSD0303,
+ TYPE_SSD0303)
-typedef struct {
+struct ssd0303_state {
I2CSlave parent_obj;
QemuConsole *con;
@@ -63,7 +66,7 @@ typedef struct {
enum ssd0303_mode mode;
enum ssd0303_cmd cmd_state;
uint8_t framebuffer[132*8];
-} ssd0303_state;
+};
static uint8_t ssd0303_recv(I2CSlave *i2c)
{