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:
parent
ed7030cffc
commit
a44abc72ec
6 changed files with 291 additions and 285 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue