Fixed Repeated-start in I2C
This commit is contained in:
parent
691cf4ed62
commit
0e6694144f
@ -344,8 +344,6 @@ int i2c_slave_read(uint8_t bus, uint8_t slave_addr, const uint8_t *data, uint8_t
|
|||||||
goto error;
|
goto error;
|
||||||
if (!i2c_write(bus, *data))
|
if (!i2c_write(bus, *data))
|
||||||
goto error;
|
goto error;
|
||||||
if (!i2c_stop(bus))
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
i2c_start(bus);
|
i2c_start(bus);
|
||||||
if (!i2c_write(bus, slave_addr << 1 | 1)) // Slave address + read
|
if (!i2c_write(bus, slave_addr << 1 | 1)) // Slave address + read
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user