diff options
Diffstat (limited to 'include/hw/misc/nrf51_rng.h')
-rw-r--r-- | include/hw/misc/nrf51_rng.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/hw/misc/nrf51_rng.h b/include/hw/misc/nrf51_rng.h index b0133bf665..7f2263a906 100644 --- a/include/hw/misc/nrf51_rng.h +++ b/include/hw/misc/nrf51_rng.h @@ -36,8 +36,11 @@ #include "hw/sysbus.h" #include "qemu/timer.h" +#include "qom/object.h" #define TYPE_NRF51_RNG "nrf51_soc.rng" -#define NRF51_RNG(obj) OBJECT_CHECK(NRF51RNGState, (obj), TYPE_NRF51_RNG) +typedef struct NRF51RNGState NRF51RNGState; +DECLARE_INSTANCE_CHECKER(NRF51RNGState, NRF51_RNG, + TYPE_NRF51_RNG) #define NRF51_RNG_SIZE 0x1000 @@ -54,7 +57,7 @@ #define NRF51_RNG_REG_CONFIG_DECEN 0 #define NRF51_RNG_REG_VALUE 0x508 -typedef struct { +struct NRF51RNGState { SysBusDevice parent_obj; MemoryRegion mmio; @@ -78,7 +81,7 @@ typedef struct { uint32_t interrupt_enabled; uint32_t filter_enabled; -} NRF51RNGState; +}; #endif /* NRF51_RNG_H */ |