maj
This commit is contained in:
parent
015ecbf1bc
commit
0461e5679b
@ -1,2 +1,3 @@
|
||||
idf_component_register(SRCS "sensirion_common.c" "sensirion_i2c.c" "sensirion_i2c_hal.c" "scd4x_i2c.c"
|
||||
INCLUDE_DIRS "include")
|
||||
INCLUDE_DIRS "include"
|
||||
REQUIRES "driver")
|
||||
|
@ -106,7 +106,7 @@ int8_t sensirion_i2c_hal_read(uint8_t address, uint8_t* data, uint16_t count) {
|
||||
err = i2c_master_read(cmdLnk, data, count-1, I2C_MASTER_ACK);
|
||||
err = i2c_master_read(cmdLnk, data + count - 1, 1, I2C_MASTER_NACK);
|
||||
err = i2c_master_stop(cmdLnk);
|
||||
i2c_master_cmd_begin(I2C_NUM_0,cmdLnk,1000 / portTICK_RATE_MS);
|
||||
i2c_master_cmd_begin(I2C_NUM_0,cmdLnk,1000 / portTICK_PERIOD_MS);
|
||||
i2c_cmd_link_delete(cmdLnk);
|
||||
return err;
|
||||
}
|
||||
@ -130,7 +130,7 @@ int8_t sensirion_i2c_hal_write(uint8_t address, const uint8_t* data,
|
||||
err = i2c_master_write_byte(cmdLnk, address << 1 | I2C_MASTER_WRITE, true);
|
||||
err = i2c_master_write(cmdLnk, data, count, true);
|
||||
err = i2c_master_stop(cmdLnk);
|
||||
i2c_master_cmd_begin(I2C_NUM_0,cmdLnk,1000 / portTICK_RATE_MS); /* TODO:non const port */
|
||||
i2c_master_cmd_begin(I2C_NUM_0,cmdLnk,1000 / portTICK_PERIOD_MS); /* TODO:non const port */
|
||||
i2c_cmd_link_delete(cmdLnk);
|
||||
return err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user