diff --git a/wifi-subsys/components/doc.txt b/wifi-subsys/components/doc.txt deleted file mode 100644 index 1b0476fd5..000000000 --- a/wifi-subsys/components/doc.txt +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @defgroup wifi-subsys_components - * @ingroup wifi-subsys - */ diff --git a/wifi-subsys/components/network/doc.txt b/wifi-subsys/components/network/doc.txt index 806220da8..8e51e1538 100644 --- a/wifi-subsys/components/network/doc.txt +++ b/wifi-subsys/components/network/doc.txt @@ -1,6 +1,6 @@ /** @defgroup wifi_component Wifi routines for the WiFi subsystem -@ingroup wifi-subsys_components +@ingroup wifi-subsys @brief Basic routines for handle the wifi-settings (modes[AP, STA, APSTA], wifi_configuration [ssid, password, channels, max_connections]) diff --git a/wifi-subsys/components/protocols/doc.txt b/wifi-subsys/components/protocols/doc.txt new file mode 100644 index 000000000..01402d809 --- /dev/null +++ b/wifi-subsys/components/protocols/doc.txt @@ -0,0 +1,15 @@ +/** +@defgroup wifi-subusys-protocols Protocols routines +@ingroup wifi-subsys +@brief this module content all protocols used for wifi- subsys + +# Overview + +In this module are all the protocols used by wifi-subys, the protocols used are: + +1) icmp: this is used to check if esp32 is connected. + +2) http_client: the http client will be used to send the data that arrives from the peripherals to the server. + +3) sntp: this protocol is used to synchronize the time on the esp32 +*/ diff --git a/wifi-subsys/components/protocols/src/httpsclient.h b/wifi-subsys/components/protocols/src/httpsclient.h index 25e26f546..edb932f09 100644 --- a/wifi-subsys/components/protocols/src/httpsclient.h +++ b/wifi-subsys/components/protocols/src/httpsclient.h @@ -15,7 +15,7 @@ */ /** - * @ingroup wifi-subsys_components + * @ingroup wifi-subusys-protocols * @{ * @file * @brief Configure a https client to make a request @@ -34,8 +34,8 @@ extern "C" { #endif -#define MAX_HTTP_RECV_BUFFER 512 -#define MAX_HTTP_OUTPUT_BUFFER 1024 +#define MAX_HTTP_RECV_BUFFER 512 /*!< maximum size to receive */ +#define MAX_HTTP_OUTPUT_BUFFER 1024 /*!< maximum size to send */ #define HTTPS_CONTENT_JSON "application/json" #define HTTPS_CONTENT_CBOR "application/cbor" @@ -45,9 +45,9 @@ extern "C" { * */ typedef struct { - int status; /*Status of the method */ - int content_len; /*size of output */ - uint8_t output[MAX_HTTP_OUTPUT_BUFFER]; /*Response buffer */ + int status; /*!< Status of the method */ + int content_len; /*!< size of output */ + uint8_t output[MAX_HTTP_OUTPUT_BUFFER]; /*!< Response buffer */ } http_response_t; /** @@ -57,16 +57,16 @@ typedef struct { typedef void (*response_callback_t)(http_response_t *); /** - * @brief Struct to make http request. - * + * @name Struct to make http request. + * @{ */ typedef struct { - int method; /*Make a method get/post*/ - char url[200]; /*Url used*/ - char body[100]; /*body used with method post*/ - char *content_type; /*Content type field of http request*/ - response_callback_t callback; + int method; /*!< Make a method get/post */ + char url[200]; /*!< Url used */ + char body[100]; /*!< body used with method post */ + response_callback_t callback; /*!< callback executed when the serve response */ } http_request_t; +/** @} */ /** * @brief Event handler of request. @@ -88,4 +88,4 @@ void http_client(http_request_t *http_request); } #endif #endif /* HTTPSCLIENT_H */ -/** @} */ + /** @} */ diff --git a/wifi-subsys/components/protocols/src/icmp_ping.h b/wifi-subsys/components/protocols/src/icmp_ping.h index 8484b687a..4301b4309 100644 --- a/wifi-subsys/components/protocols/src/icmp_ping.h +++ b/wifi-subsys/components/protocols/src/icmp_ping.h @@ -15,10 +15,10 @@ */ /** - * + * @ingroup wifi-subusys-protocols * @{ + * @file * @brief icmp module - * @copyright Copyright (c) 2021 Mesh for all * @author xkevin190 * */ diff --git a/wifi-subsys/components/protocols/src/protocol_sntp.h b/wifi-subsys/components/protocols/src/protocol_sntp.h index 1f4278224..f12a4f799 100644 --- a/wifi-subsys/components/protocols/src/protocol_sntp.h +++ b/wifi-subsys/components/protocols/src/protocol_sntp.h @@ -16,8 +16,9 @@ /** * - * @ingroup wifi-subsys_components + * @ingroup wifi-subusys-protocols * @{ + * @file * @brief sntp (Simple Network Time Protocol) * @author eduazocar * @@ -37,7 +38,6 @@ extern "C" { /** * @brief Define a callback to every time function */ - typedef void (*callback_time_t)(void); /** diff --git a/wifi-subsys/components/storage/doc.txt b/wifi-subsys/components/storage/doc.txt index 7b3d0175d..3e5b34a02 100644 --- a/wifi-subsys/components/storage/doc.txt +++ b/wifi-subsys/components/storage/doc.txt @@ -1,6 +1,6 @@ /** @defgroup storage NVS routines for the WiFi subsystem -@ingroup wifi-subsys_components +@ingroup wifi-subsys @brief Basic routines for handle the NVS # Overview diff --git a/wifi-subsys/components/tools/doc.txt b/wifi-subsys/components/tools/doc.txt new file mode 100644 index 000000000..d139c3039 --- /dev/null +++ b/wifi-subsys/components/tools/doc.txt @@ -0,0 +1,8 @@ +/** +@defgroup wifi-subsys-tools Tools +@ingroup wifi-subsys +@brief module created to contain the reusable functions in wifi-subsys + +# Overview + In this module all the reusable functions in wifi subsys will be allocated, at this moment we only have the serialization functions. +*/ diff --git a/wifi-subsys/components/tools/src/dummy.c b/wifi-subsys/components/tools/src/dummy.c deleted file mode 100644 index bc9bf5dfc..000000000 --- a/wifi-subsys/components/tools/src/dummy.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Mesh4all - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @brief Dummy file , Part of Tools component - * - * @author luisan00 - */ diff --git a/wifi-subsys/components/tools/src/serialization.h b/wifi-subsys/components/tools/src/serialization.h index 5a193b38a..4f16ef1ba 100644 --- a/wifi-subsys/components/tools/src/serialization.h +++ b/wifi-subsys/components/tools/src/serialization.h @@ -15,10 +15,10 @@ */ /** - * + * @ingroup wifi-subsys-tools * @{ * @brief Cbor encoder and decoder functions to manipulate a group of data. - * + * @file * @author xkevin190 * @author eduazocar * diff --git a/wifi-subsys/components/uart/doc.txt b/wifi-subsys/components/uart/doc.txt new file mode 100644 index 000000000..8fcc6fd06 --- /dev/null +++ b/wifi-subsys/components/uart/doc.txt @@ -0,0 +1,9 @@ +/** + @defgroup wifi_subsys_uart Wifi-subsys Uart Module + @ingroup wifi-subsys + @brief Basic implementation of uart functions for wifi subsys + + # Overview + Basic routines for handle the uart, here you can send and receive data through uart. + In this module also you can send AT COMMANDS and to handle of the board settings. + */ diff --git a/wifi-subsys/components/uart/src/at_handler.h b/wifi-subsys/components/uart/src/at_handler.h index 8cef4a68f..8647f9772 100644 --- a/wifi-subsys/components/uart/src/at_handler.h +++ b/wifi-subsys/components/uart/src/at_handler.h @@ -15,9 +15,10 @@ */ /** - * @ingroup wifi-subsys_components + * @ingroup wifi_subsys_uart + * @brief AT handler * @{ - * @brief uart module + * @file * @author xkevin190 */ @@ -32,18 +33,9 @@ extern "C" #endif /** - * @name this struct content the key and value of the AT request + * @name All AT commands * @{ */ -typedef struct { - char *value; /*!< AT value */ - char *key; /*!< AT key */ - char action[2];/*!< AT action */ - char read_or_write[2]; /*!< AT type */ -} at_request_t; -/** @} */ - - enum at_keys_n { NVS_RST = 0, /*!< Restore the subsystem to factory settings */ WIFI_OFF, /*!< Turn off the WiFi interface */ @@ -59,6 +51,19 @@ enum at_keys_n { ATH, /*!< this will enable at mode */ ATHO, /*!< this will disable at mode */ }; +/** @} */ + +/** + * @name this struct content the key and value of the AT request + * @{ + */ +typedef struct { + char *value; /*!< AT value */ + char *key; /*!< AT key */ + char action[2];/*!< AT action */ + char read_or_write[2]; /*!< AT type */ +} at_request_t; +/** @} */ /** * @brief this function is a handler where will be identified AT commands diff --git a/wifi-subsys/components/uart/src/subsys_uart.h b/wifi-subsys/components/uart/src/subsys_uart.h index 980eb836e..be56b147a 100644 --- a/wifi-subsys/components/uart/src/subsys_uart.h +++ b/wifi-subsys/components/uart/src/subsys_uart.h @@ -15,11 +15,13 @@ */ /** - * - * @brief uart module - * + * @ingroup wifi_subsys_uart + * @brief Uart module + * @{ + * @file * @author xkevin190 * + * */ #ifndef SUBSYS_UART_H #define SUBSYS_UART_H @@ -29,10 +31,6 @@ #ifdef __cplusplus extern "C" { #endif -/** - * @brief this struct content the key and value of the AT request - * - */ /** * @brief this function initialize the uart @@ -55,6 +53,7 @@ void rx_receive(); * */ void tx_send_loop(); + /** * @brief this function is executed when rx_receive function identify * that the datos arrived were sensors values. @@ -64,10 +63,10 @@ void tx_send_loop(); void received_sensor_data(uint8_t *values); /** - * @brief this function is a handler where will be identified AT commands - * and it will executed the functions for controlled the wifi. + * @brief this function is used to send data through uart * - * @param at_comant [in] AT comands + * @param logName [in] logName + * @param data [in] data */ int sendData(const char *logName, char *data); @@ -82,3 +81,4 @@ esp_err_t setting_uart(); } #endif #endif /* SUBSYS_UART_H */ +/* @} */