added doxygen

This commit is contained in:
2021-01-21 00:01:27 +01:00
parent b29887e0ac
commit f3749b9985
6 changed files with 269 additions and 16 deletions

View File

@ -1,13 +1,32 @@
/**
* @file Blinky_LED.c
* @brief Demo application using the mesh network
* @author Hendrik Schutter
* @date 20.01.2021
*
* Additional Infos: If button "BOOT" on ESP32-Module is pressed, all LED2 (blue) in the network will toggle the state.
*/
#include "Blinky_LED.h"
static const char *LOG_TAG = "blinky_led";
static bool bLEDisOn = false; //set led default off
static mesh_addr_t addrParent; //addr of parent node
static mesh_addr_t addrParent; //addr of parent node
static mesh_addr_t childrenAddr[CONFIG_MESH_ROUTE_TABLE_SIZE]; //array of children attached to this node
static uint16_t u16ChildrenSize; //number of children attached to this node
xQueueHandle queueBlinkyLEDPackets; //handle for led action queue
esp_err_t errBlinkyLEDInitialize()
/**
* @fn esp_err_t errBlinkyLEDInitialize()
* @brief Starts the demp app
* @param void
* @return ESP32 error code
* @author Hendrik Schutter
* @date 20.01.2021
*
* Initialize the queue and starts the tasks
*/
esp_err_t errBlinkyLEDInitialize(void)
{
esp_err_t err = ESP_OK;
BaseType_t xReturned;
@ -45,7 +64,17 @@ esp_err_t errBlinkyLEDInitialize()
return err;
}
void vGPIOInitialize()
/**
* @fn void vGPIOInitialize(void)
* @brief sets the GPIO pins to correct modes
* @param void
* @return void
* @author Hendrik Schutter
* @date 20.01.2021
*
* Initialize GPIO
*/
void vGPIOInitialize(void)
{
gpio_config_t gpioConf;
@ -62,6 +91,17 @@ void vGPIOInitialize()
gpio_config(&gpioConf);
}
/**
* @fn void rxHandle(const uint8_t* const pu8Data, const uint8_t* const pu8Sender)
* @brief callback handler from mesh network layer
* @param pu8Data data received
* @param pu8Sender sender node from data
* @return void
* @author Hendrik Schutter
* @date 20.01.2021
*
* Adds the data into queue
*/
void rxHandle(const uint8_t* const pu8Data, const uint8_t* const pu8Sender)
{
//send payload to app queue
@ -74,6 +114,16 @@ void rxHandle(const uint8_t* const pu8Data, const uint8_t* const pu8Sender)
}
}
/**
* @fn void vTaskReadUserInput(void *arg)
* @brief FreeRTOS task reading the user input (button)
* @param args parameter for task
* @return void
* @author Hendrik Schutter
* @date 20.01.2021
*
* Adds a button press to the queue
*/
void vTaskReadUserInput(void *arg)
{
esp_err_t err = ESP_OK;
@ -129,6 +179,16 @@ void vTaskReadUserInput(void *arg)
}
}
/**
* @fn void vTaskReceiveData(void *arg)
* @brief FreeRTOS task reading queue and setting the LED
* @param args parameter for task
* @return void
* @author Hendrik Schutter
* @date 20.01.2021
*
* Sets the LED off or on based on data in queue
*/
void vTaskReceiveData(void *arg)
{
esp_err_t err = ESP_OK;