main/task_mqtt.h

Tue, 08 Oct 2019 21:09:36 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 08 Oct 2019 21:09:36 +0200
changeset 4
2a57c466bf45
parent 0
88d965579617
child 9
a85995941d0d
permissions
-rw-r--r--

FreeRTOS scheduler from 100 Hz to 200 Hz. All units data is now protected with a semaphore.

/**
 * @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 connect_mqtt(bool state);


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


void publishNode(void);
void publishUnits(void);


/**
 * @brief The FreeRTOS task to run MQTT connections.
 */
void task_mqtt(void *);


#endif

mercurial