diff options
Diffstat (limited to 'include/hw/gpio/nrf51_gpio.h')
-rw-r--r-- | include/hw/gpio/nrf51_gpio.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/hw/gpio/nrf51_gpio.h b/include/hw/gpio/nrf51_gpio.h index 1d62bbc928..55d7d24a52 100644 --- a/include/hw/gpio/nrf51_gpio.h +++ b/include/hw/gpio/nrf51_gpio.h @@ -27,8 +27,11 @@ #define NRF51_GPIO_H #include "hw/sysbus.h" +#include "qom/object.h" #define TYPE_NRF51_GPIO "nrf51_soc.gpio" -#define NRF51_GPIO(obj) OBJECT_CHECK(NRF51GPIOState, (obj), TYPE_NRF51_GPIO) +typedef struct NRF51GPIOState NRF51GPIOState; +DECLARE_INSTANCE_CHECKER(NRF51GPIOState, NRF51_GPIO, + TYPE_NRF51_GPIO) #define NRF51_GPIO_PINS 32 @@ -47,7 +50,7 @@ #define NRF51_GPIO_PULLDOWN 1 #define NRF51_GPIO_PULLUP 3 -typedef struct NRF51GPIOState { +struct NRF51GPIOState { SysBusDevice parent_obj; MemoryRegion mmio; @@ -63,7 +66,7 @@ typedef struct NRF51GPIOState { uint32_t old_out_connected; qemu_irq output[NRF51_GPIO_PINS]; -} NRF51GPIOState; +}; #endif |