Skip to content

Conversation

@fadushin
Copy link
Collaborator

This PR contains sever improvements to the SHT3x, BME280, and BH1750 I2C drivers, in addition to the i2c_bus.

The following high level changes are made:

  • All drivers now use atomic i2c functions, instead of enqueuing calls to be wrapped in begin/end transmission. This results in fewer calls to the I2C driver
  • BREAKING CHANGE: The BH1750 measurement values are now floats, instead of rationals. This follows previous changes to the SHT3x and BME280 drivers. (All of these drivers were written before floating point support in AtomVM)
  • Misc cosmetic naming changes to make the code more consistent.
  • Added start_link functions to the BH1750 driver, for completeness.
  • Updates to the rebar.confg files in the I2C examples to align with latest rebar plugin behavior

Tested with the forthcoming resource-based Nif driver.

@arpunk arpunk merged commit 453c4f4 into master Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants