mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 05:00:23 +08:00
Update i2c_core.c
修复I2C读写函数,I2C传输失败时返回成功的问题
This commit is contained in:
parent
d62215b705
commit
1e6137268d
@ -93,7 +93,7 @@ rt_size_t rt_i2c_master_send(struct rt_i2c_bus_device *bus,
|
||||
const rt_uint8_t *buf,
|
||||
rt_uint32_t count)
|
||||
{
|
||||
rt_size_t ret;
|
||||
rt_err_t ret;
|
||||
struct rt_i2c_msg msg;
|
||||
|
||||
msg.addr = addr;
|
||||
@ -112,7 +112,7 @@ rt_size_t rt_i2c_master_recv(struct rt_i2c_bus_device *bus,
|
||||
rt_uint8_t *buf,
|
||||
rt_uint32_t count)
|
||||
{
|
||||
rt_size_t ret;
|
||||
rt_err_t ret;
|
||||
struct rt_i2c_msg msg;
|
||||
RT_ASSERT(bus != RT_NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user