ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
Functions for using SPI bus. More...
Files | |
file | ruuvi_interface_spi_bme280.h |
SPI read/write functions for Bosch BME280. | |
file | ruuvi_interface_spi_dps310.h |
SPI read/write functions for Infineon DPS310. | |
Functions | |
int8_t | ri_spi_bme280_write (uint8_t dev_id, uint8_t reg_addr, uint8_t *p_reg_data, uint16_t len) |
SPI write function for BME280. More... | |
int8_t | ri_spi_bme280_read (uint8_t dev_id, uint8_t reg_addr, uint8_t *p_reg_data, uint16_t len) |
SPI Read function for BME280. More... | |
uint32_t | ri_spi_dps310_write (const void *const comm_ctx, const uint8_t reg_addr, const uint8_t *const p_reg_data, const uint8_t data_len) |
SPI write function for DPS310. More... | |
uint32_t | ri_spi_dps310_read (const void *const comm_ctx, const uint8_t reg_addr, uint8_t *const p_reg_data, const uint8_t data_len) |
SPI Read function for DPS310. More... | |
Functions for using SPI bus.
int8_t ri_spi_bme280_read | ( | uint8_t | dev_id, |
uint8_t | reg_addr, | ||
uint8_t * | p_reg_data, | ||
uint16_t | len | ||
) |
SPI Read function for BME280.
Binds Ruuvi Interface SPI functions into official Bosch BME280 driver. Handles GPIO chip select, there is no forced delay to let th CS settle.
[in] | dev_id | SPI functions interface handle, i.e. pin number of the chip select pin of BME280. |
[in] | reg_addr | BME280 register address to read. |
[in] | p_reg_data | pointer to data to be received. |
[in] | len | length of data to be received. |
Definition at line 40 of file ruuvi_interface_spi_bme280.c.
int8_t ri_spi_bme280_write | ( | uint8_t | dev_id, |
uint8_t | reg_addr, | ||
uint8_t * | p_reg_data, | ||
uint16_t | len | ||
) |
SPI write function for BME280.
Binds Ruuvi Interface SPI functions into official Bosch BME280 driver. Handles GPIO chip select, there is no forced delay to let th CS settle.
[in] | dev_id | SPI functions interface handle, i.e. pin number of the chip select pin of BME280. |
[in] | reg_addr | BME280 register address to write. |
[in] | p_reg_data | pointer to data to be written. |
[in] | len | length of data to be written. |
Definition at line 27 of file ruuvi_interface_spi_bme280.c.
uint32_t ri_spi_dps310_read | ( | const void *const | comm_ctx, |
const uint8_t | reg_addr, | ||
uint8_t *const | p_reg_data, | ||
const uint8_t | data_len | ||
) |
SPI Read function for DPS310.
Binds Ruuvi Interface SPI functions into Ruuvi DPS310 driver. Handles GPIO chip select, there is no forced delay to let the CS settle.
[in] | comm_ctx | SPI functions interface handle, i.e. pin number of the chip select pin of DPS310. |
[in] | reg_addr | DPS310 register address to read. |
[in] | p_reg_data | pointer to data to be received. |
[in] | data_len | length of data to be received. |
0 | on Success. |
uint32_t ri_spi_dps310_write | ( | const void *const | comm_ctx, |
const uint8_t | reg_addr, | ||
const uint8_t *const | p_reg_data, | ||
const uint8_t | data_len | ||
) |
SPI write function for DPS310.
Binds Ruuvi Interface SPI functions into Ruuvi's DPS310 driver. Handles GPIO chip select, there is no forced delay to let the CS settle.
[in] | comm_ctx | SPI functions interface handle, i.e. pin number of the chip select pin of DPS310. |
[in] | reg_addr | DPS310 register address to write. |
[in] | p_reg_data | pointer to data to be written. |
[in] | data_len | length of data to be written. |
0 | on Success. |