2 #if RI_BME280_ENABLED && RI_BME280_I2C_ENABLED
38 uint8_t * reg_data, uint16_t len)
43 if (1 > len || 2 < len) {
return -1; }
45 uint8_t wbuf[2] = {0};
47 wbuf[1] = reg_data[0];
69 uint8_t * reg_data, uint16_t len)
uint32_t rd_status_t
bitfield for representing errors
#define RD_SUCCESS
Internal Error.
int8_t ri_i2c_bme280_read(uint8_t dev_id, uint8_t reg_addr, uint8_t *p_reg_data, uint16_t len)
I2C Read function for BME280.
int8_t ri_i2c_bme280_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *p_reg_data, uint16_t len)
I2C write function for BME280.
Header to enable and disable module compilation.
Ruuvi error codes and error check function.
Interface for I2C operations.
rd_status_t ri_i2c_write_blocking(const uint8_t address, uint8_t *const p_tx, const size_t tx_len, const bool stop)
I2C read function.
rd_status_t ri_i2c_read_blocking(const uint8_t address, uint8_t *const p_rx, const size_t rx_len)
I2C read function.