diff options
author | Juan Quintela <quintela@redhat.com> | 2009-09-29 22:48:26 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:37 -0500 |
commit | 5b7f53270a613f897a2ff9ea54284dbdd6057873 (patch) | |
tree | e60fe857aa9fa050007a7417a674904e68e52cf1 /hw/smbus.c | |
parent | c7cc172d207d4719a21c8c2a874919eaf2da1273 (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/smbus.c')
-rw-r--r-- | hw/smbus.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/hw/smbus.c b/hw/smbus.c index 6c1149b9fd..e464539150 100644 --- a/hw/smbus.c +++ b/hw/smbus.c @@ -217,13 +217,13 @@ void smbus_register_device(SMBusDeviceInfo *info) } /* Master device commands. */ -void smbus_quick_command(i2c_bus *bus, int addr, int read) +void smbus_quick_command(i2c_bus *bus, uint8_t addr, int read) { i2c_start_transfer(bus, addr, read); i2c_end_transfer(bus); } -uint8_t smbus_receive_byte(i2c_bus *bus, int addr) +uint8_t smbus_receive_byte(i2c_bus *bus, uint8_t addr) { uint8_t data; @@ -234,14 +234,14 @@ uint8_t smbus_receive_byte(i2c_bus *bus, int addr) return data; } -void smbus_send_byte(i2c_bus *bus, int addr, uint8_t data) +void smbus_send_byte(i2c_bus *bus, uint8_t addr, uint8_t data) { i2c_start_transfer(bus, addr, 0); i2c_send(bus, data); i2c_end_transfer(bus); } -uint8_t smbus_read_byte(i2c_bus *bus, int addr, uint8_t command) +uint8_t smbus_read_byte(i2c_bus *bus, uint8_t addr, uint8_t command) { uint8_t data; i2c_start_transfer(bus, addr, 0); @@ -253,7 +253,7 @@ uint8_t smbus_read_byte(i2c_bus *bus, int addr, uint8_t command) return data; } -void smbus_write_byte(i2c_bus *bus, int addr, uint8_t command, uint8_t data) +void smbus_write_byte(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t data) { i2c_start_transfer(bus, addr, 0); i2c_send(bus, command); @@ -261,7 +261,7 @@ void smbus_write_byte(i2c_bus *bus, int addr, uint8_t command, uint8_t data) i2c_end_transfer(bus); } -uint16_t smbus_read_word(i2c_bus *bus, int addr, uint8_t command) +uint16_t smbus_read_word(i2c_bus *bus, uint8_t addr, uint8_t command) { uint16_t data; i2c_start_transfer(bus, addr, 0); @@ -274,7 +274,7 @@ uint16_t smbus_read_word(i2c_bus *bus, int addr, uint8_t command) return data; } -void smbus_write_word(i2c_bus *bus, int addr, uint8_t command, uint16_t data) +void smbus_write_word(i2c_bus *bus, uint8_t addr, uint8_t command, uint16_t data) { i2c_start_transfer(bus, addr, 0); i2c_send(bus, command); @@ -283,7 +283,7 @@ void smbus_write_word(i2c_bus *bus, int addr, uint8_t command, uint16_t data) i2c_end_transfer(bus); } -int smbus_read_block(i2c_bus *bus, int addr, uint8_t command, uint8_t *data) +int smbus_read_block(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t *data) { int len; int i; @@ -301,7 +301,7 @@ int smbus_read_block(i2c_bus *bus, int addr, uint8_t command, uint8_t *data) return len; } -void smbus_write_block(i2c_bus *bus, int addr, uint8_t command, uint8_t *data, +void smbus_write_block(i2c_bus *bus, uint8_t addr, uint8_t command, uint8_t *data, int len) { int i; |