|
ruuvi.drivers.c ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
Functions for using I2C bus. More...
Files | |
| file | ruuvi_interface_i2c_bme280.h |
| I2C read/write functions for Bosch BME280. | |
| file | ruuvi_interface_i2c_tmp117.c |
| I2C read/write functions for TI TMP117. | |
| file | ruuvi_interface_i2c_tmp117.h |
| I2C read/write functions for TI TMP117. | |
Macros | |
| #define | TMP_ADDR_SIZE (1U) |
| #define | TMP_REG_SIZE (2U) |
| #define | TMP_TX_SIZE (TMP_ADDR_SIZE + TMP_REG_SIZE) |
Functions | |
| 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. | |
| 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. | |
| rd_status_t | ri_i2c_tmp117_write (const uint8_t dev_id, const uint8_t reg_addr, const uint16_t reg_val) |
| I2C write function for TMP117. | |
| rd_status_t | ri_i2c_tmp117_read (const uint8_t dev_id, const uint8_t reg_addr, uint16_t *const reg_val) |
| I2C Read function for TMP117. | |
Functions for using I2C bus.
| #define TMP_ADDR_SIZE (1U) |
Definition at line 19 of file ruuvi_interface_i2c_tmp117.c.
| #define TMP_REG_SIZE (2U) |
Definition at line 20 of file ruuvi_interface_i2c_tmp117.c.
| #define TMP_TX_SIZE (TMP_ADDR_SIZE + TMP_REG_SIZE) |
Definition at line 21 of file ruuvi_interface_i2c_tmp117.c.
| 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.
Binds Ruuvi Interface I2C functions into official Bosch BME280 driver.
| [in] | dev_id | I2C functions interface handle, i.e. I2C addess 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. |
| 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.
Binds Ruuvi Interface I2C functions into official Bosch BME280 driver.
| [in] | dev_id | I2C functions interface handle, i.e. I2C addess 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. |
| rd_status_t ri_i2c_tmp117_read | ( | const uint8_t | dev_id, |
| const uint8_t | reg_addr, | ||
| uint16_t *const | reg_val | ||
| ) |
I2C Read function for TMP117.
Binds Ruuvi Interface I2C functions for TMP117
| [in] | dev_id | I2C functions interface handle, i.e. I2C addess of TMP117. |
| [in] | reg_addr | TMP117 register address to read. |
| [in] | reg_val | pointer to 16-bit data to be received. |
Definition at line 33 of file ruuvi_interface_i2c_tmp117.c.
| rd_status_t ri_i2c_tmp117_write | ( | const uint8_t | dev_id, |
| const uint8_t | reg_addr, | ||
| const uint16_t | reg_val | ||
| ) |
I2C write function for TMP117.
| [in] | dev_id | I2C functions interface handle, i.e. I2C addess of TMP117 |
| [in] | reg_addr | TMP117 register address to write. |
| [in] | reg_val | 16-bit value to be written |
Definition at line 23 of file ruuvi_interface_i2c_tmp117.c.