ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
Implement rd_sensor_t functions on TMP117. More...
Files | |
file | ruuvi_interface_tmp117.c |
file | ruuvi_interface_tmp117.h |
Implement rd_sensor_t functions on TMP117.
The implementation supports taking single-samples and a continuous mode
#define TMP117_CC_RESET_DELAY_MS (4U) |
Definition at line 95 of file ruuvi_interface_tmp117.h.
#define TMP117_CC_RETRIES_MAX (5U) |
Definition at line 28 of file ruuvi_interface_tmp117.c.
#define TMP117_CC_RETRY_DELAY_MS (10U) |
Definition at line 29 of file ruuvi_interface_tmp117.c.
#define TMP117_MASK_CC (0x0380U) |
Definition at line 60 of file ruuvi_interface_tmp117.h.
#define TMP117_MASK_DRDY (1U << TMP117_POS_DRDY) |
Definition at line 86 of file ruuvi_interface_tmp117.h.
#define TMP117_MASK_ID (0x01FFU) |
Definition at line 57 of file ruuvi_interface_tmp117.h.
#define TMP117_MASK_MODE (0x0C00U) |
Definition at line 59 of file ruuvi_interface_tmp117.h.
#define TMP117_MASK_OS (0x0060U) |
Definition at line 58 of file ruuvi_interface_tmp117.h.
#define TMP117_MASK_RESET (0x0002U) |
Definition at line 56 of file ruuvi_interface_tmp117.h.
#define TMP117_OS_1_TSAMPLE_MS (16U) |
Definition at line 89 of file ruuvi_interface_tmp117.h.
#define TMP117_OS_32_TSAMPLE_MS (500U) |
Definition at line 91 of file ruuvi_interface_tmp117.h.
#define TMP117_OS_64_TSAMPLE_MS (1000U) |
Definition at line 92 of file ruuvi_interface_tmp117.h.
#define TMP117_OS_8_TSAMPLE_MS (125U) |
Definition at line 90 of file ruuvi_interface_tmp117.h.
#define TMP117_POS_CC (7U) |
Definition at line 70 of file ruuvi_interface_tmp117.h.
#define TMP117_POS_DRDY (13U) |
Definition at line 85 of file ruuvi_interface_tmp117.h.
#define TMP117_POS_MODE (10U) |
Definition at line 80 of file ruuvi_interface_tmp117.h.
#define TMP117_POS_OS (5U) |
Definition at line 64 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_CONFIGURATION (0x01U) |
Definition at line 46 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_DEVICE_ID (0x0FU) |
Definition at line 54 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_EEPROM1 (0x05U) |
Definition at line 50 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_EEPROM2 (0x06U) |
Definition at line 51 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_EEPROM3 (0x08U) |
Definition at line 53 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_EEPROM_UL (0x04U) |
Definition at line 49 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_TEMP_OFFSET (0x07U) |
Definition at line 52 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_TEMP_RESULT (0x00U) |
Definition at line 45 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_THIGH_LIMIT (0x02U) |
Definition at line 47 of file ruuvi_interface_tmp117.h.
#define TMP117_REG_TLOW_LIMIT (0x03U) |
Definition at line 48 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_1000_MS (0x04U << TMP117_POS_CC) |
Definition at line 75 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_125_MS (0x01U << TMP117_POS_CC) |
Definition at line 72 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_16000_MS (0x07U << TMP117_POS_CC) |
Definition at line 78 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_16_MS (0x00U << TMP117_POS_CC) |
Definition at line 71 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_250_MS (0x02U << TMP117_POS_CC) |
Definition at line 73 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_4000_MS (0x05U << TMP117_POS_CC) |
Definition at line 76 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_500_MS (0x03U << TMP117_POS_CC) |
Definition at line 74 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_CC_8000_MS (0x06U << TMP117_POS_CC) |
Definition at line 77 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_ID (0x0117U) |
Definition at line 62 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_MODE_CONT (0x00U << TMP117_POS_MODE) |
Definition at line 83 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_MODE_SINGLE (0x03U << TMP117_POS_MODE) |
Definition at line 82 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_MODE_SLEEP (0x01U << TMP117_POS_MODE) |
Definition at line 81 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_OS_1 (0x00U << TMP117_POS_OS) |
Definition at line 65 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_OS_32 (0x02U << TMP117_POS_OS) |
Definition at line 67 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_OS_64 (0x03U << TMP117_POS_OS) |
Definition at line 68 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_OS_8 (0x01U << TMP117_POS_OS) |
Definition at line 66 of file ruuvi_interface_tmp117.h.
#define TMP117_VALUE_TEMP_NA (0x8000U) |
Definition at line 88 of file ruuvi_interface_tmp117.h.
rd_status_t ri_tmp117_data_get | ( | rd_sensor_data_t *const | data | ) |
Definition at line 823 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_dsp_get | ( | uint8_t * | dsp, |
uint8_t * | parameter | ||
) |
Definition at line 653 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_dsp_set | ( | uint8_t * | dsp, |
uint8_t * | parameter | ||
) |
Definition at line 583 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_init | ( | rd_sensor_t * | environmental_sensor, |
rd_bus_t | bus, | ||
uint8_t | handle | ||
) |
rd_status_t ri_tmp117_mode_get | ( | uint8_t * | mode | ) |
Definition at line 803 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_mode_set | ( | uint8_t * | mode | ) |
Definition at line 768 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_resolution_get | ( | uint8_t * | resolution | ) |
Definition at line 527 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_resolution_set | ( | uint8_t * | resolution | ) |
Definition at line 503 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_samplerate_get | ( | uint8_t * | samplerate | ) |
Definition at line 446 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_samplerate_set | ( | uint8_t * | samplerate | ) |
Definition at line 381 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_scale_get | ( | uint8_t * | scale | ) |
Definition at line 567 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_scale_set | ( | uint8_t * | scale | ) |
Definition at line 543 of file ruuvi_interface_tmp117.c.
rd_status_t ri_tmp117_uninit | ( | rd_sensor_t * | sensor, |
rd_bus_t | bus, | ||
uint8_t | handle | ||
) |
Definition at line 357 of file ruuvi_interface_tmp117.c.