Closed g8kig closed 1 year ago
The function i2cbb_read_i2c_block_data in file i2cbb.c is possibly missing curly brackets judging by the indentation.
uint8_t i = 0; for (i = 0; i < length - 1; i++) values[i] = i2c_read_byte(0,0); values[i] = i2c_read_byte(1,1); i2c_stop_cond();
should this actually be
uint8_t i = 0; for (i = 0; i < length - 1; i++){ values[i] = i2c_read_byte(0,0); values[i] = i2c_read_byte(1,1); i2c_stop_cond(); }
The last byte has to send a stop bit. If you see the code of i2c_read_byte, the second parameter signals sending a stop bit that ends the block read. The indentation is badly done, but the code is alright.
The function i2cbb_read_i2c_block_data in file i2cbb.c is possibly missing curly brackets judging by the indentation.
should this actually be