Mon, 17 Apr 2023 16:20:58 +0200
Version 0.4.1 Measure internal chip temperature, range -10 to 80. Result available in mqtt json payload.
/** * @file task_temp.h * @brief The FreeRTOS task to query the chip temperature sensor. * The task will update the sensor state structures. */ #ifndef _TASK_TEMP_H #define _TASK_TEMP_H /* * Error codes in this task */ #define TEMP_ERR_NONE 0 ///< No errors #define TEMP_ERR_READ 1 /** * @brief Structure containing the variables for the TEMP task. */ typedef struct { bool valid; ///< Valid measurement float temperature; ///< Temperature in celsius int error; ///< Error result } TEMP_State; /** * @brief Request a new measurement from the temperature sensor. */ void request_temp(void); /** * @brief Check if results are ready * @return true of results are ready, else false. */ bool ready_temp(void); /** * @brief The FreeRTOS task to update the temperature on request. * @param pvParameters Parameters for the task. */ void task_temp(void *pvParameters); #endif