I2C/SPI Combined Driver #3
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 genericBMP5XX
.The bus type gets determined by whether
spi
andcs
ori2c
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