修复i2c通讯异常时的返回信息
This commit is contained in:
@ -78,7 +78,7 @@ rt_size_t rt_i2c_transfer(struct rt_i2c_bus_device *bus,
|
|||||||
{
|
{
|
||||||
LOG_E("I2C bus operation not supported");
|
LOG_E("I2C bus operation not supported");
|
||||||
|
|
||||||
return 0;
|
return -RT_EIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ rt_err_t rt_i2c_control(struct rt_i2c_bus_device *bus,
|
|||||||
{
|
{
|
||||||
LOG_E("I2C bus operation not supported");
|
LOG_E("I2C bus operation not supported");
|
||||||
|
|
||||||
return 0;
|
return -RT_EIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user