monitor/hmp: move hmp_drive_mirror and hmp_drive_backup to block-hmp-cmds.c
[qemu/ar7.git] / include / hw / display / i2c-ddc.h
blob1cf53a0c8dbc8244380d6186897c4eede77c5106
1 /* A simple I2C slave for returning monitor EDID data via DDC.
3 * Copyright (c) 2011 Linaro Limited
4 * Written by Peter Maydell
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, see <http://www.gnu.org/licenses/>.
19 #ifndef I2C_DDC_H
20 #define I2C_DDC_H
22 #include "hw/display/edid.h"
23 #include "hw/i2c/i2c.h"
25 /* A simple I2C slave which just returns the contents of its EDID blob. */
26 struct I2CDDCState {
27 /*< private >*/
28 I2CSlave i2c;
29 /*< public >*/
30 bool firstbyte;
31 uint8_t reg;
32 qemu_edid_info edid_info;
33 uint8_t edid_blob[128];
36 typedef struct I2CDDCState I2CDDCState;
38 #define TYPE_I2CDDC "i2c-ddc"
39 #define I2CDDC(obj) OBJECT_CHECK(I2CDDCState, (obj), TYPE_I2CDDC)
41 #endif /* I2C_DDC_H */