Skip to content

Commit

Permalink
Merge pull request #603 from UncleRus/fix-ads111x-trigger
Browse files Browse the repository at this point in the history
fix: fixes #593
  • Loading branch information
UncleRus authored Feb 4, 2024
2 parents 6ae438c + e17c1b4 commit 1aed534
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/ads111x/ads111x.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ static esp_err_t write_conf_bits(i2c_dev_t *dev, uint16_t val, uint8_t offs,

I2C_DEV_TAKE_MUTEX(dev);
I2C_DEV_CHECK(dev, read_reg(dev, REG_CONFIG, &old));
// Issue #593
if (offs != OS_OFFSET || mask != OS_MASK)
old &= ~(OS_MASK << OS_OFFSET);
I2C_DEV_CHECK(dev, write_reg(dev, REG_CONFIG, (old & ~(mask << offs)) | (val << offs)));
I2C_DEV_GIVE_MUTEX(dev);

Expand Down

0 comments on commit 1aed534

Please sign in to comment.