Skip to content

Conversation

FoamyGuy
Copy link
Contributor

This relies on the changes from: adafruit/Adafruit_CircuitPython_Register#59 So that should be merged before this is.

Adds SPI support by using new functionality pending addition to adafruit_register

This should be a major version bump if merged because the class name changed from the bus specific BMP5XX_I2C to the now generic BMP5XX.

The bus type gets determined by whether spi and cs or i2c are passed to the constructor. Everything gets handled externally and code that using the driver has the same API after the BMP5XX class is created.

Internally the command and chip_id register descriptors were changed from UnaryStructs to RW/RO Bits. This was because the (Register_SPI)[https://github.com/adafruit/Adafruit_CircuitPython_Register_SPI] classes that I started from only had Bit and Bits implemented, no Struct(s). The change doesn't make any difference in the API.

I tested both I2C and SPI examples successfully on Adafruit CircuitPython 10.0.0-beta.3 on 2025-08-29; Adafruit Feather RP2040 with rp2040

@FoamyGuy FoamyGuy marked this pull request as draft September 25, 2025 19:58
@FoamyGuy FoamyGuy marked this pull request as ready for review October 2, 2025 17:07
@FoamyGuy FoamyGuy requested a review from a team October 2, 2025 17:08
@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Oct 2, 2025

Note: this should bump to 2.0.0 when released because the class name change from BMP5XX_I2C -> BMP5XX will cause old code using new library to break.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's hash out the new constructor args here first: adafruit/Adafruit_CircuitPython_SPA06_003#1

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.

2 participants