The Temperature device layer is the proprietary user code used to configure and detect the board temperature. More...
Files | |
file | dev_temp.h |
Contains temperature initialization and execution functions. | |
Functions | |
void | Dev_Temp_Initialize (void) |
Initializes the temperature data structure. | |
void | Dev_Temp_Task_100ms (void) |
Executes the Temperature reading every 100ms. | |
uint16_t | Dev_Temp_AverageValue (void) |
Returns the average adc temperature reading. | |
int8_t | Dev_Temp_Get_Temperature_Celcius (void) |
This converts the raw values to temperature celcius as per device lookup table. | |
uint8_t | Dev_Temp_Is_Over_Temperature (void) |
Returns the status of the Over Temperature flag. | |
void | Dev_Temp_Get_ADC_Sample (void) |
Gets the temperature ADC sample. | |
static uint16_t | Average_Temp_ADC_Samples (void) |
Returns the temperature average value. | |
static uint16_t | Temp_Calculate_Average (uint16_t *buffer, uint16_t length) |
Averages the temperature ADC samples. | |
Variables | |
TEMP_SETTINGS_t | devTempData |
Data Object of temperature settings. | |
|
static |
This function returns the average result of the temperature ADC samples.
Definition at line 139 of file dev_temp.c.
uint16_t Dev_Temp_AverageValue | ( | void | ) |
This function returns the average ADC temperature reading.
Definition at line 73 of file dev_temp.c.
void Dev_Temp_Get_ADC_Sample | ( | void | ) |
This function gets the temperature ADC sample and adds it to the temperature buffer for averaging use.
< store last 128 values and then average
< flag to monitor if full then do averaging.
Definition at line 117 of file dev_temp.c.
int8_t Dev_Temp_Get_Temperature_Celcius | ( | void | ) |
This function takes in the current adc values and get the closest high temperature value in the lookup table. i.e. if the averaged value is 3195, it will return the temperature value corresponding to 3079 i.e. 65. This value is offset by 40 degrees to avoid working with negative.
Definition at line 87 of file dev_temp.c.
void Dev_Temp_Initialize | ( | void | ) |
This function initializes the temperature data structure.
< Over temperature flag
< if Sensor is present
< temperature raw
< temperature raw
< temperature celcius.
Definition at line 45 of file dev_temp.c.
uint8_t Dev_Temp_Is_Over_Temperature | ( | void | ) |
This function returns the status of the Over Temperature flag.
Definition at line 105 of file dev_temp.c.
void Dev_Temp_Task_100ms | ( | void | ) |
This function executes temperature reading every 100ms
Definition at line 60 of file dev_temp.c.
|
static |
This function averages the temperature ADC samples.
Definition at line 153 of file dev_temp.c.
TEMP_SETTINGS_t devTempData |
The 'devTempData' data object holds the settings for temperature sensor.
Definition at line 30 of file dev_temp.c.