-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using multiple device with SPI connection problem #16
Comments
I am stuck with this too, Would you mind to provide a bit more detail? |
Merged
you can try #19 |
Please update to the 2.1.0 release and see if that resolves this issue: |
Closing due to lack of response. Linked release above should resolve this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just found bug on this code
if we using multiple BMP388 with SPI
i found the reading on first initialized device is error
after i check the pointer for SPI is on global variable
Adafruit_SPIDevice *spi_dev = NULL; ///< Global SPI interface pointer
so i move this variable on local class variable
and change this 2 function
//
/*!
@brief Reads 8 bit values over SPI
*/
//
static int8_t spi_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len,
void *intf_ptr) {
((Adafruit_SPIDevice)intf_ptr)*->write_then_read(®_addr, 1, reg_data, len, 0xFF);
return 0;
}
//
/*!
@brief Writes 8 bit values over SPI
*/
//
static int8_t spi_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len,
void *intf_ptr) {
((Adafruit_SPIDevice)intf_ptr)*->write((uint8_t *)reg_data, len, ®_addr, 1);
return 0;
}
it solve the issue
Thanks
The text was updated successfully, but these errors were encountered: