diff options
Diffstat (limited to 'tests/ds1338-test.c')
| -rw-r--r-- | tests/ds1338-test.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/ds1338-test.c b/tests/ds1338-test.c index 742dad9113..88f829f241 100644 --- a/tests/ds1338-test.c +++ b/tests/ds1338-test.c @@ -35,17 +35,11 @@ static inline uint8_t bcd2bin(uint8_t x) static void send_and_receive(void) { - uint8_t cmd[1]; uint8_t resp[7]; time_t now = time(NULL); struct tm *tm_ptr = gmtime(&now); - /* reset the index in the RTC memory */ - cmd[0] = 0; - i2c_send(i2c, addr, cmd, 1); - - /* retrieve the date */ - i2c_recv(i2c, addr, resp, 7); + i2c_read_block(i2c, addr, 0, resp, sizeof(resp)); /* check retrieved time againt local time */ g_assert_cmpuint(bcd2bin(resp[4]), == , tm_ptr->tm_mday); |