diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2019-05-11 15:12:49 -0500 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-05-11 15:12:49 -0500 |
commit | 9e80202352dd49bdd9e67b8b906d86f058431505 (patch) | |
tree | 5673c17aad6e3833da8c4ff21b5a11f666ec9fbe /src/hw/lm32/lm32.h | |
download | hqemu-master.zip hqemu-master.tar.gz |
Diffstat (limited to 'src/hw/lm32/lm32.h')
-rw-r--r-- | src/hw/lm32/lm32.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/hw/lm32/lm32.h b/src/hw/lm32/lm32.h new file mode 100644 index 0000000..18aa6fd --- /dev/null +++ b/src/hw/lm32/lm32.h @@ -0,0 +1,29 @@ +#ifndef HW_LM32_H +#define HW_LM32_H 1 + +#include "hw/char/lm32_juart.h" + +static inline DeviceState *lm32_pic_init(qemu_irq cpu_irq) +{ + DeviceState *dev; + SysBusDevice *d; + + dev = qdev_create(NULL, "lm32-pic"); + qdev_init_nofail(dev); + d = SYS_BUS_DEVICE(dev); + sysbus_connect_irq(d, 0, cpu_irq); + + return dev; +} + +static inline DeviceState *lm32_juart_init(void) +{ + DeviceState *dev; + + dev = qdev_create(NULL, TYPE_LM32_JUART); + qdev_init_nofail(dev); + + return dev; +} + +#endif |