pc-dimm: pass in the machine and to the MemoryHotplugState
[qemu/ar7.git] / tests / libqos / i2c.h
blobeb40b808bdf336ac4229a413856617515532932d
1 /*
2 * I2C libqos
4 * Copyright (c) 2012 Andreas Färber
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
9 #ifndef LIBQOS_I2C_H
10 #define LIBQOS_I2C_H
12 #include "libqtest.h"
14 typedef struct I2CAdapter I2CAdapter;
15 struct I2CAdapter {
16 void (*send)(I2CAdapter *adapter, uint8_t addr,
17 const uint8_t *buf, uint16_t len);
18 void (*recv)(I2CAdapter *adapter, uint8_t addr,
19 uint8_t *buf, uint16_t len);
21 QTestState *qts;
24 void i2c_send(I2CAdapter *i2c, uint8_t addr,
25 const uint8_t *buf, uint16_t len);
26 void i2c_recv(I2CAdapter *i2c, uint8_t addr,
27 uint8_t *buf, uint16_t len);
29 /* libi2c-omap.c */
30 I2CAdapter *omap_i2c_create(QTestState *qts, uint64_t addr);
32 /* libi2c-imx.c */
33 I2CAdapter *imx_i2c_create(QTestState *qts, uint64_t addr);
35 #endif