diff options
Diffstat (limited to 'cts/i2c')
-rw-r--r-- | cts/i2c/dut.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/cts/i2c/dut.c b/cts/i2c/dut.c index e4a87f440e..033aca7ffc 100644 --- a/cts/i2c/dut.c +++ b/cts/i2c/dut.c @@ -13,25 +13,28 @@ #include "uart.h" #include "watchdog.h" -#define TH_ADDR 0x3c +#define TH_ADDR__7bf 0x1e enum cts_rc write8_test(void) { - if (i2c_write8(i2c_ports[0].port, TH_ADDR, WRITE8_OFF, WRITE8_DATA)) + if (i2c_write8__7bf(i2c_ports[0].port, TH_ADDR__7bf, + WRITE8_OFF, WRITE8_DATA)) return CTS_RC_FAILURE; return CTS_RC_SUCCESS; } enum cts_rc write16_test(void) { - if (i2c_write16(i2c_ports[0].port, TH_ADDR, WRITE16_OFF, WRITE16_DATA)) + if (i2c_write16__7bf(i2c_ports[0].port, TH_ADDR__7bf, + WRITE16_OFF, WRITE16_DATA)) return CTS_RC_FAILURE; return CTS_RC_SUCCESS; } enum cts_rc write32_test(void) { - if (i2c_write32(i2c_ports[0].port, TH_ADDR, WRITE32_OFF, WRITE32_DATA)) + if (i2c_write32__7bf(i2c_ports[0].port, TH_ADDR__7bf, + WRITE32_OFF, WRITE32_DATA)) return CTS_RC_FAILURE; return CTS_RC_SUCCESS; } @@ -40,7 +43,8 @@ enum cts_rc read8_test(void) { int data; - if (i2c_read8(i2c_ports[0].port, TH_ADDR, READ8_OFF, &data)) + if (i2c_read8__7bf(i2c_ports[0].port, TH_ADDR__7bf, + READ8_OFF, &data)) return CTS_RC_FAILURE; if (data != READ8_DATA) { CPRINTL("Expecting 0x%x but read 0x%x", READ8_DATA, data); @@ -54,7 +58,8 @@ enum cts_rc read16_test(void) { int data; - if (i2c_read16(i2c_ports[0].port, TH_ADDR, READ16_OFF, &data)) + if (i2c_read16__7bf(i2c_ports[0].port, TH_ADDR__7bf, + READ16_OFF, &data)) return CTS_RC_FAILURE; if (data != READ16_DATA) { CPRINTL("Expecting 0x%x but read 0x%x", READ16_DATA, data); @@ -68,7 +73,8 @@ enum cts_rc read32_test(void) { int data; - if (i2c_read32(i2c_ports[0].port, TH_ADDR, READ32_OFF, &data)) + if (i2c_read32__7bf(i2c_ports[0].port, TH_ADDR__7bf, + READ32_OFF, &data)) return CTS_RC_FAILURE; if (data != READ32_DATA) { CPRINTL("Read 0x%x expecting 0x%x", data, READ32_DATA); |