bcm2835_aux: refactor state to header file
[qemu/ar7.git] / include / hw / char / bcm2835_aux.h
blob76e15f8cc4e499265fe567c77a85880568434e96
1 /*
2 * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft
3 * Written by Andrew Baumann
5 * This code is licensed under the GNU GPLv2 and later.
6 */
8 #ifndef BCM2835_AUX_H
9 #define BCM2835_AUX_H
11 #include "hw/sysbus.h"
12 #include "sysemu/char.h"
14 #define TYPE_BCM2835_AUX "bcm2835_aux"
15 #define BCM2835_AUX(obj) OBJECT_CHECK(Bcm2835AuxState, (obj), TYPE_BCM2835_AUX)
17 typedef struct {
18 SysBusDevice parent_obj;
20 MemoryRegion iomem;
21 uint32_t read_fifo[8];
22 bool rx_int_enable, tx_int_enable;
23 int read_pos;
24 int read_count;
25 CharDriverState *chr;
26 qemu_irq irq;
27 const unsigned char *id;
28 } Bcm2835AuxState;
30 #endif