Common Function definitions for Temperature Sensor driver.
Functions | |
| temp_sensor_status_t | tempSensor_applyConfig (temp_sensor_instance_t *temp) |
| Apply I2C + Temp Sensor configuration. | |
| temp_sensor_status_t | tempSensor_enableErrorInterrupt (temp_sensor_instance_t *temp) |
| Enable error interrupt for the Temperature Sensor. | |
| u8 | tempSensor_readTempReg (temp_sensor_instance_t *temp, const u8 reg) |
| Read a register from the Temperature Sensor. | |
| u8 | tempSensor_writeTempReg (temp_sensor_instance_t *temp, const u8 reg, const u8 data) |
| Write a value to a register in the Temperature Sensor. | |
| u8 | tempSensor_encodeTempLimit (float val, u8 is_extended, u8 *out_hb, u8 *out_lb) |
| Encode temperature limit into high and low byte format. | |
| float | tempSensor_calTempCelsius (u8 hb, u8 lb, u8 is_extended) |
| Calculate temperature in Celsius from high and low byte format. | |
| temp_sensor_status_t tempSensor_applyConfig | ( | temp_sensor_instance_t * | temp | ) |
#include <temp_sensor.h>
Apply I2C + Temp Sensor configuration.
| rtc | Pointer to Temperature Sensor instance. |
Definition at line 21 of file temp_sensor.c.
#include <temp_sensor.h>
Calculate temperature in Celsius from high and low byte format.
| hb | High byte of the temperature value. |
| lb | Low byte of the temperature value. |
| is_extended | Flag indicating if extended range is used. |
Definition at line 59 of file temp_sensor.c.
| temp_sensor_status_t tempSensor_enableErrorInterrupt | ( | temp_sensor_instance_t * | temp | ) |
#include <temp_sensor.h>
Enable error interrupt for the Temperature Sensor.
| rtc | Pointer to Temperature Sensor instance. |
Definition at line 31 of file temp_sensor.c.
#include <temp_sensor.h>
Encode temperature limit into high and low byte format.
| val | Temperature value to encode. |
| is_extended | Flag indicating if extended range is used. |
| out_hb | Pointer to store the output high byte. |
| out_lb | Pointer to store the output low byte. |
Definition at line 72 of file temp_sensor.c.
| u8 tempSensor_readTempReg | ( | temp_sensor_instance_t * | temp, |
| const u8 | reg ) |
#include <temp_sensor.h>
Read a register from the Temperature Sensor.
| temp | Pointer to Temperature Sensor instance. |
| reg | Register address to read from. |
Definition at line 39 of file temp_sensor.c.
| u8 tempSensor_writeTempReg | ( | temp_sensor_instance_t * | temp, |
| const u8 | reg, | ||
| const u8 | data ) |
#include <temp_sensor.h>
Write a value to a register in the Temperature Sensor.
| temp | Pointer to Temperature Sensor instance. |
| reg | Register address to write to. |
| data | Value to write to the register. |
Definition at line 49 of file temp_sensor.c.