qom: Use returned bool to check for failure, Coccinelle part
[qemu/ar7.git] / include / hw / char / bcm2835_aux.h
blob934acf9c81392127d263235d98810f422b67a294
1 /*
2 * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft
3 * Written by Andrew Baumann
5 * This work is licensed under the terms of the GNU GPL, version 2 or later.
6 * See the COPYING file in the top-level directory.
7 */
9 #ifndef BCM2835_AUX_H
10 #define BCM2835_AUX_H
12 #include "hw/sysbus.h"
13 #include "chardev/char-fe.h"
15 #define TYPE_BCM2835_AUX "bcm2835-aux"
16 #define BCM2835_AUX(obj) OBJECT_CHECK(BCM2835AuxState, (obj), TYPE_BCM2835_AUX)
18 #define BCM2835_AUX_RX_FIFO_LEN 8
20 typedef struct {
21 /*< private >*/
22 SysBusDevice parent_obj;
23 /*< public >*/
25 MemoryRegion iomem;
26 CharBackend chr;
27 qemu_irq irq;
29 uint8_t read_fifo[BCM2835_AUX_RX_FIFO_LEN];
30 uint8_t read_pos, read_count;
31 uint8_t ier, iir;
32 } BCM2835AuxState;
34 #endif