OpenBIC
OpenSource Bridge-IC
|
#include "tmp431.h"
#include <stdio.h>
#include <stdlib.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "libutil.h"
#include <logging/log.h>
Classes | |
struct | _temp_mapping_register |
Macros | |
#define | TMP432_STATUS_REG 0x02 |
#define | TMP432_OPEN_STATUS_REG 0x1B |
#define | TMP432_HIGH_LIMIT_STATUS_REG 0x35 |
#define | TMP432_LOW_LIMIT_STATUS_REG 0x36 |
#define | I2C_DATA_SIZE 5 |
#define | RANGE_0_127 0 |
#define | RANGE_m55_150 1 |
Typedefs | |
typedef struct _temp_mapping_register | temp_mapping_register |
Functions | |
LOG_MODULE_REGISTER (dev_tmp431) | |
bool | get_tmp432_two_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
bool | get_tmp432_one_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
bool | tmp432_get_temp_threshold (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
bool | set_tmp432_two_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
bool | set_tmp432_one_byte_limit (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
bool | tmp432_set_temp_threshold (sensor_cfg *cfg, uint8_t temp_threshold_index, uint32_t *millidegree_celsius) |
uint8_t | tmp431_read (sensor_cfg *cfg, int *reading) |
bool | tmp432_get_temp_status (sensor_cfg *cfg, uint8_t *temp_status) |
bool | tmp432_clear_temp_status (sensor_cfg *cfg) |
uint8_t | tmp431_init (sensor_cfg *cfg) |
Variables | |
temp_mapping_register | tmp432_temp_register_map [] |
#define I2C_DATA_SIZE 5 |
#define RANGE_0_127 0 |
#define RANGE_m55_150 1 |
#define TMP432_HIGH_LIMIT_STATUS_REG 0x35 |
#define TMP432_LOW_LIMIT_STATUS_REG 0x36 |
#define TMP432_OPEN_STATUS_REG 0x1B |
#define TMP432_STATUS_REG 0x02 |
typedef struct _temp_mapping_register temp_mapping_register |
bool get_tmp432_one_byte_limit | ( | sensor_cfg * | cfg, |
uint8_t | temp_threshold_index, | ||
uint32_t * | millidegree_celsius | ||
) |
bool get_tmp432_two_byte_limit | ( | sensor_cfg * | cfg, |
uint8_t | temp_threshold_index, | ||
uint32_t * | millidegree_celsius | ||
) |
LOG_MODULE_REGISTER | ( | dev_tmp431 | ) |
bool set_tmp432_one_byte_limit | ( | sensor_cfg * | cfg, |
uint8_t | temp_threshold_index, | ||
uint32_t * | millidegree_celsius | ||
) |
bool set_tmp432_two_byte_limit | ( | sensor_cfg * | cfg, |
uint8_t | temp_threshold_index, | ||
uint32_t * | millidegree_celsius | ||
) |
uint8_t tmp431_init | ( | sensor_cfg * | cfg | ) |
uint8_t tmp431_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
bool tmp432_clear_temp_status | ( | sensor_cfg * | cfg | ) |
bool tmp432_get_temp_status | ( | sensor_cfg * | cfg, |
uint8_t * | temp_status | ||
) |
bool tmp432_get_temp_threshold | ( | sensor_cfg * | cfg, |
uint8_t | temp_threshold_index, | ||
uint32_t * | millidegree_celsius | ||
) |
bool tmp432_set_temp_threshold | ( | sensor_cfg * | cfg, |
uint8_t | temp_threshold_index, | ||
uint32_t * | millidegree_celsius | ||
) |
temp_mapping_register tmp432_temp_register_map[] |