Added parameter info to doxygen
This commit is contained in:
@@ -36,6 +36,12 @@ static uint32_t bgcolor;
|
||||
static int inpub_id;
|
||||
static const char *TAG = "mug";
|
||||
|
||||
/**
|
||||
* @brief callback function for publishing data
|
||||
*
|
||||
* @param[in] arg
|
||||
* @param[in] result whether the publish was successfull or not
|
||||
*/
|
||||
static void mqtt_pub_request_cb(void *arg, err_t result) {
|
||||
if(result != ERR_OK) {
|
||||
LOG_DEBUG(TAG, "Publish result: %d", result);
|
||||
@@ -45,6 +51,9 @@ static void mqtt_pub_request_cb(void *arg, err_t result) {
|
||||
/**
|
||||
* @brief Publishes data
|
||||
* Publishes the names of all the .bmp and .gif files on the topic getImageList
|
||||
*
|
||||
* @param[in] client pointer to the MQTT client
|
||||
* @param[in] arg
|
||||
*/
|
||||
static void publish_data(mqtt_client_t *client, void *arg) {
|
||||
char pub_payload[200] = {0};
|
||||
@@ -93,6 +102,10 @@ static void publish_data(mqtt_client_t *client, void *arg) {
|
||||
/**
|
||||
* @brief Handles incoming publish
|
||||
* Callback function for when data was published to a subscribed topic
|
||||
*
|
||||
* @param[in] arg
|
||||
* @param[in] topic The topic on which an incomming publish was received
|
||||
* @param[in] tot_len length of the incoming data
|
||||
*/
|
||||
static void mqtt_incoming_publish_cb(void *arg, const char *topic, uint32_t tot_len) {
|
||||
LOG_DEBUG(TAG, "Incoming publish at topic %s with total length %u", topic, (unsigned int)tot_len);
|
||||
@@ -114,6 +127,11 @@ static void mqtt_incoming_publish_cb(void *arg, const char *topic, uint32_t tot_
|
||||
/**
|
||||
* @brief Handles incoming publish data
|
||||
* Handles the recieved data from a publish to a subscribed topic
|
||||
*
|
||||
* @param[in] arg
|
||||
* @param[in] data the incoming data
|
||||
* @param[in] len length of the data
|
||||
* @param[in] flags Whether this is the last fragment of the incoming data
|
||||
*/
|
||||
static void mqtt_incoming_data_cb(void *arg, const uint8_t *data, uint16_t len, uint8_t flags) {
|
||||
char data_buffer[len + 1];
|
||||
@@ -161,6 +179,9 @@ static void mqtt_incoming_data_cb(void *arg, const uint8_t *data, uint16_t len,
|
||||
|
||||
/**
|
||||
* @brief Callback function for outgoing subscribe request
|
||||
*
|
||||
* @param[in] arg
|
||||
* @param[in] result
|
||||
*/
|
||||
static void mqtt_sub_request_cb(void *arg, err_t result) {
|
||||
LOG_DEBUG(TAG, "Subscribe result: %d", result);
|
||||
@@ -170,6 +191,10 @@ static void mqtt_sub_request_cb(void *arg, err_t result) {
|
||||
* @brief Callback function for attempting a connection
|
||||
* If a connection was made setup a callback function for incoming publishes.
|
||||
* subscribes to the input topics and calls the publish_data function.
|
||||
*
|
||||
* @param[in] client pointer to the MQTT client
|
||||
* @param[in] arg
|
||||
* @param[in] status Connect result code or disconnection notification
|
||||
*/
|
||||
static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t status) {
|
||||
err_t err;
|
||||
@@ -204,6 +229,8 @@ static void mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection
|
||||
/**
|
||||
* @brief Attempts to create a connection to the mosquitto broker
|
||||
* Creates a mqtt client and sets up a connection callback function
|
||||
*
|
||||
* @param[in] client pointer to the MQTT client
|
||||
*/
|
||||
static void mosquitto_connect(mqtt_client_t *client) {
|
||||
struct mqtt_connect_client_info_t ci;
|
||||
@@ -247,6 +274,9 @@ void mug_init(void) {
|
||||
|
||||
/**
|
||||
* @brief Reads the color input string and outputs it to a useable value for LCD_APi
|
||||
*
|
||||
* @param[out] color define to use with the LCD_API
|
||||
* @param[in] color input string to select a color
|
||||
*/
|
||||
uint32_t color_picker(char* color) {
|
||||
uint32_t output = LCD_BLACK;
|
||||
|
||||
Reference in New Issue
Block a user