14 #if RI_TMP117_ENABLED || DOXYGEN
19 #define TMP_ADDR_SIZE (1U)
20 #define TMP_REG_SIZE (2U)
21 #define TMP_TX_SIZE (TMP_ADDR_SIZE + TMP_REG_SIZE)
24 const uint8_t reg_addr,
const uint16_t reg_val)
27 command[0] = reg_addr;
28 command[1] = reg_val >> 8;
29 command[2] = reg_val & 0xFF;
34 const uint8_t reg_addr,
35 uint16_t *
const reg_val)
39 command[0] = reg_addr;
42 *reg_val = (uint16_t) (command[1] << 8U) + command[2];
uint32_t rd_status_t
bitfield for representing errors
#define RD_SUCCESS
Internal Error.
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.
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.
I2C read/write functions for TI TMP117.