ldc1612: shutdown on i2c errors
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
committed by
KevinOConnor
parent
1563a68144
commit
1c3b30b815
@@ -146,7 +146,8 @@ check_home(struct ldc1612 *ld, uint32_t data)
|
||||
static void
|
||||
read_reg(struct ldc1612 *ld, uint8_t reg, uint8_t *res)
|
||||
{
|
||||
i2c_dev_read(ld->i2c, sizeof(reg), ®, 2, res);
|
||||
int ret = i2c_dev_read(ld->i2c, sizeof(reg), ®, 2, res);
|
||||
i2c_shutdown_on_err(ret);
|
||||
}
|
||||
|
||||
// Read the status register on the ldc1612
|
||||
|
||||
Reference in New Issue
Block a user