main/task_mqtt.h

Sun, 10 Sep 2023 17:29:15 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 10 Sep 2023 17:29:15 +0200
changeset 37
50dbb626fbab
parent 15
64028e178ff1
permissions
-rw-r--r--

Version 0.4.3. Attempt to fix the sunlight overflow of the APDS9930 sensor in the private part of the esp-idf-lib. Removed some error checks from functions that always return OK. Store light sensor registers in the state record and report the values in the json result string.

/**
 * @file task_mqtt.h
 * @brief The FreeRTOS task to maintain MQTT connections.
 */

#ifndef	_TASK_MQTT_H
#define	_TASK_MQTT_H



/**
 * @brief Request a MQTT connection
 * @param state Request of disconnect a connection.
 */
void request_mqtt(bool state);


/**
 * @brief Check if MQTT is connected
 * @return Returns true if MQTT is connected
 */
bool ready_mqtt(void);


/**
 * @brief Wait for disconnect with timeout.
 * @param time Timeout in milliseconds.
 */
void wait_mqtt(int time);


/**
 * @brief Publish
 */
void publish(void);


/**
 * @brief The FreeRTOS task to run MQTT connections.
 * @param pvParameters Parameters for the task.
 */
void task_mqtt(void *pvParameters);


#endif

mercurial