Common Function definitions for Temperature Sensor driver.
Functions | |
| u8 | temp_readTempReg (temp_sensor_instance_t *temp, const u8 reg) |
| Read a register from the Temperature Sensor. | |
| u8 | temp_writeTempReg (temp_sensor_instance_t *temp, const u8 reg, const u8 data) |
| Write a value to a register in the Temperature Sensor. | |
| u8 | encode_temp_limit (float val, u8 is_extended, u8 *out_hb, u8 *out_lb) |
| Encode temperature limit into high and low byte format. | |
| float | calculate_temp_celsius (u8 hb, u8 lb, u8 is_extended) |
| Calculate temperature in Celsius from high and low byte format. | |
#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 42 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 55 of file temp_sensor.c.
| u8 temp_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 22 of file temp_sensor.c.
| u8 temp_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 32 of file temp_sensor.c.