aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:26 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:37 -0500
commit5b7f53270a613f897a2ff9ea54284dbdd6057873 (patch)
treee60fe857aa9fa050007a7417a674904e68e52cf1 /hw/i2c.h
parentc7cc172d207d4719a21c8c2a874919eaf2da1273 (diff)
i2c: addresses are load/save as uint8_t values, change types to reflect this
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/i2c.h')
-rw-r--r--hw/i2c.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/i2c.h b/hw/i2c.h
index 238f2560a2..65887a2d7b 100644
--- a/hw/i2c.h
+++ b/hw/i2c.h
@@ -40,13 +40,13 @@ struct i2c_slave
I2CSlaveInfo *info;
/* Remaining fields for internal use by the I2C code. */
- uint32_t address;
+ uint8_t address;
};
i2c_bus *i2c_init_bus(DeviceState *parent, const char *name);
-void i2c_set_slave_address(i2c_slave *dev, int address);
+void i2c_set_slave_address(i2c_slave *dev, uint8_t address);
int i2c_bus_busy(i2c_bus *bus);
-int i2c_start_transfer(i2c_bus *bus, int address, int recv);
+int i2c_start_transfer(i2c_bus *bus, uint8_t address, int recv);
void i2c_end_transfer(i2c_bus *bus);
void i2c_nack(i2c_bus *bus);
int i2c_send(i2c_bus *bus, uint8_t data);
@@ -59,7 +59,7 @@ void i2c_slave_load(QEMUFile *f, i2c_slave *dev);
void i2c_register_slave(I2CSlaveInfo *type);
-DeviceState *i2c_create_slave(i2c_bus *bus, const char *name, int addr);
+DeviceState *i2c_create_slave(i2c_bus *bus, const char *name, uint8_t addr);
/* max7310.c */
void max7310_reset(i2c_slave *i2c);