Atmel Software Framework

temperature.h File Reference
#include "compiler.h"
#include "FreeRTOS.h"
#include "shell.h"
#include "datalog.h"

Functions

bool b_temperature_get_value (xLogDef *pxLog)
 Get the current temperature value. More...
 
bool b_temperature_init (void)
 Init the temperature channel. More...
 
eExecStatus e_temperature_get_config (signed portCHAR **ppcStringReply)
 Get the temperature sensor config. More...
 
eExecStatus e_temperature_set_config (signed portCHAR **ppcStringReply, int ac, signed portCHAR *av[])
 Set the sensor config. More...
 

Variables

unsigned int ul_temp_lograte
 

bool b_temperature_get_value ( xLogDef pxLog)

Get the current temperature value.

Parameters
pxLoga Log structure.
Returns
true upon success, false if error.

References adc, adc_disable(), adc_enable(), adc_get_value(), adc_start(), b_temp_alarm, b_temp_alarm_max, b_temp_alarm_min, index, l_temp_max, l_temp_min, NULL, LogDef::pcStringLog, pdFALSE, pdTRUE, LogDef::pfFreeStringLog, pvPortMalloc(), sprintf(), temperature_code, v_SMTP_Post, and vPortFree().

Referenced by b_sensor_get_value().

bool b_temperature_init ( void  )
eExecStatus e_temperature_get_config ( signed portCHAR **  ppcStringReply)

Get the temperature sensor config.

Parameters
ppcStringReplyInput/Output. The response string. NEVER NULL AS INPUT. A malloc for the response string is performed here; the caller must free this string.
Returns
the status of the command execution.

References b_temp_alarm, l_temp_max, l_temp_min, NULL, pdTRUE, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, sprintf(), TEMPERATURE_GETCONF_MAXLEN, and ul_temp_lograte.

eExecStatus e_temperature_set_config ( signed portCHAR **  ppcStringReply,
int  ac,
signed portCHAR *  av[] 
)

Set the sensor config.

Parameters
ppcStringReplyInput/Output. The response string. NEVER NULL AS INPUT.
acInput. Number of args
avInput. pointer to args
Returns
the status of the command execution.

References b_temp_alarm, config_file_set_value(), l_temp_max, l_temp_min, NULL, pdFALSE, pdTRUE, SENSOR_MSG_ALARM_OFF, SENSOR_MSG_ALARM_ON, SENSOR_MSG_CONFIG_SET, SENSOR_TEMP_CONFIG_FILE, SHELL_ERRMSG_CONFIGERROR, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK_NO_FREE, and ul_temp_lograte.

unsigned int ul_temp_lograte

Declaration for datalog use

Value for the log rate.

Referenced by b_temperature_init(), e_temperature_get_config(), e_temperature_set_config(), and portTASK_FUNCTION().