aboutsummaryrefslogtreecommitdiff
path: root/hw/avr/atmega.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/avr/atmega.c')
-rw-r--r--hw/avr/atmega.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c
index 7131224431..44c6afebbb 100644
--- a/hw/avr/atmega.c
+++ b/hw/avr/atmega.c
@@ -17,6 +17,7 @@
#include "sysemu/sysemu.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
+#include "qom/object.h"
#include "hw/boards.h" /* FIXME memory_region_allocate_system_memory for sram */
#include "hw/misc/unimp.h"
#include "atmega.h"
@@ -45,7 +46,7 @@ typedef struct {
bool is_timer16;
} peripheral_cfg;
-typedef struct AtmegaMcuClass {
+struct AtmegaMcuClass {
/*< private >*/
SysBusDeviceClass parent_class;
/*< public >*/
@@ -59,12 +60,11 @@ typedef struct AtmegaMcuClass {
size_t adc_count;
const uint8_t *irq;
const peripheral_cfg *dev;
-} AtmegaMcuClass;
+};
+typedef struct AtmegaMcuClass AtmegaMcuClass;
-#define ATMEGA_MCU_CLASS(klass) \
- OBJECT_CLASS_CHECK(AtmegaMcuClass, (klass), TYPE_ATMEGA_MCU)
-#define ATMEGA_MCU_GET_CLASS(obj) \
- OBJECT_GET_CLASS(AtmegaMcuClass, (obj), TYPE_ATMEGA_MCU)
+DECLARE_CLASS_CHECKERS(AtmegaMcuClass, ATMEGA_MCU,
+ TYPE_ATMEGA_MCU)
static const peripheral_cfg dev168_328[PERIFMAX] = {
[USART0] = { 0xc0, POWER0, 1 },