mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-26 09:38:33 -07:00
htu21d: Support for HTI21D family sensor on I2C bus (#2803)
Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
This commit is contained in:
parent
f8649b4ba9
commit
dac42efbd9
5 changed files with 304 additions and 1 deletions
|
|
@ -91,7 +91,8 @@ void
|
|||
i2c_read(struct i2c_config config, uint8_t reg_len, uint8_t *reg
|
||||
, uint8_t read_len, uint8_t *data)
|
||||
{
|
||||
i2c_write(config, reg_len, reg);
|
||||
if(reg_len != 0)
|
||||
i2c_write(config, reg_len, reg);
|
||||
int ret = read(config.fd, data, read_len);
|
||||
if (ret != read_len) {
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue