1
0
Fork 0
mirror of https://github.com/SMFSW/cI2C synced 2025-07-04 20:46:56 +02:00

v1.1: fixed bus speed calc & returning configuration value applied instead of bool

This commit is contained in:
SMFSW 2017-11-30 01:32:44 +01:00
parent ed7030cffc
commit a44abc72ec
6 changed files with 291 additions and 285 deletions

View file

@ -64,7 +64,7 @@ void loop() {
*/
bool I2C_wr_advanced(I2C_SLAVE * slave, const uint16_t reg_addr, uint8_t * data, const uint16_t bytes)
{
if (bytes == 0) { return false; }
if (bytes == 0) { return false; }
slave->reg_addr = reg_addr;
@ -100,7 +100,7 @@ bool I2C_wr_advanced(I2C_SLAVE * slave, const uint16_t reg_addr, uint8_t * data,
*/
bool I2C_rd_advanced(I2C_SLAVE * slave, const uint16_t reg_addr, uint8_t * data, const uint16_t bytes)
{
if (bytes == 0) { return false; }
if (bytes == 0) { return false; }
slave->reg_addr = reg_addr;