monitor: Fix tracepoint crash on JSON syntax error
[qemu/armbru.git] / include / hw / misc / pca9552.h
blobebb43c63fe110085b3b18c631feaa0472aedac88
1 /*
2 * PCA9552 I2C LED blinker
4 * Copyright (c) 2017-2018, IBM Corporation.
6 * This work is licensed under the terms of the GNU GPL, version 2 or
7 * later. See the COPYING file in the top-level directory.
8 */
9 #ifndef PCA9552_H
10 #define PCA9552_H
12 #include "hw/i2c/i2c.h"
14 #define TYPE_PCA9552 "pca9552"
15 #define PCA9552(obj) OBJECT_CHECK(PCA9552State, (obj), TYPE_PCA9552)
17 #define PCA9552_NR_REGS 10
19 typedef struct PCA9552State {
20 /*< private >*/
21 I2CSlave i2c;
22 /*< public >*/
24 uint8_t len;
25 uint8_t pointer;
27 uint8_t regs[PCA9552_NR_REGS];
28 uint8_t max_reg;
29 uint8_t nr_leds;
30 } PCA9552State;
32 #endif