diff --git a/firmware/common/i2c_lpc.c b/firmware/common/i2c_lpc.c index f7bf4393..607a1a0a 100644 --- a/firmware/common/i2c_lpc.c +++ b/firmware/common/i2c_lpc.c @@ -44,17 +44,23 @@ void i2c_lpc_transfer(i2c_bus_t* const bus, uint8_t* const data_rx, const size_t count_rx ) { const uint32_t port = (uint32_t)bus->obj; - i2c_tx_start(port); - i2c_tx_byte(port, (slave_address << 1) | I2C_WRITE); - for(size_t i=0; i 0)) { + i2c_tx_start(port); + i2c_tx_byte(port, (slave_address << 1) | I2C_WRITE); + for(i=0; i 0)) { i2c_tx_start(port); i2c_tx_byte(port, (slave_address << 1) | I2C_READ); - for(size_t i=0; i