Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Fixed the documentation in wifi-subsys #216

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions wifi-subsys/components/doc.txt

This file was deleted.

2 changes: 1 addition & 1 deletion wifi-subsys/components/network/doc.txt
Original file line number Diff line number Diff line change
@@ -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])

Expand Down
15 changes: 15 additions & 0 deletions wifi-subsys/components/protocols/doc.txt
Original file line number Diff line number Diff line change
@@ -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
*/
28 changes: 14 additions & 14 deletions wifi-subsys/components/protocols/src/httpsclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/**
* @ingroup wifi-subsys_components
* @ingroup wifi-subusys-protocols
* @{
* @file
* @brief Configure a https client to make a request
Expand All @@ -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"
Expand All @@ -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;

/**
Expand All @@ -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.
Expand All @@ -88,4 +88,4 @@ void http_client(http_request_t *http_request);
}
#endif
#endif /* HTTPSCLIENT_H */
/** @} */
/** @} */
4 changes: 2 additions & 2 deletions wifi-subsys/components/protocols/src/icmp_ping.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

/**
*
* @ingroup wifi-subusys-protocols
* @{
* @file
* @brief icmp module
* @copyright Copyright (c) 2021 Mesh for all
* @author xkevin190 <[email protected]>
*
*/
Expand Down
4 changes: 2 additions & 2 deletions wifi-subsys/components/protocols/src/protocol_sntp.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

/**
*
* @ingroup wifi-subsys_components
* @ingroup wifi-subusys-protocols
* @{
* @file
* @brief sntp (Simple Network Time Protocol)
* @author eduazocar <[email protected]>
*
Expand All @@ -37,7 +38,6 @@ extern "C" {
/**
* @brief Define a callback to every time function
*/

typedef void (*callback_time_t)(void);

/**
Expand Down
2 changes: 1 addition & 1 deletion wifi-subsys/components/storage/doc.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions wifi-subsys/components/tools/doc.txt
Original file line number Diff line number Diff line change
@@ -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.
*/
21 changes: 0 additions & 21 deletions wifi-subsys/components/tools/src/dummy.c

This file was deleted.

4 changes: 2 additions & 2 deletions wifi-subsys/components/tools/src/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

/**
*
* @ingroup wifi-subsys-tools
* @{
* @brief Cbor encoder and decoder functions to manipulate a group of data.
*
* @file
* @author xkevin190 <[email protected]>
* @author eduazocar <[email protected]>
*
Expand Down
9 changes: 9 additions & 0 deletions wifi-subsys/components/uart/doc.txt
Original file line number Diff line number Diff line change
@@ -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.
*/
29 changes: 17 additions & 12 deletions wifi-subsys/components/uart/src/at_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/

/**
* @ingroup wifi-subsys_components
* @ingroup wifi_subsys_uart
* @brief AT handler
* @{
* @brief uart module
* @file
* @author xkevin190 <[email protected]>
*/

Expand All @@ -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 */
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions wifi-subsys/components/uart/src/subsys_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
*/

/**
*
* @brief uart module
*
* @ingroup wifi_subsys_uart
* @brief Uart module
* @{
* @file
* @author xkevin190 <[email protected]>
*
*
*/
#ifndef SUBSYS_UART_H
#define SUBSYS_UART_H
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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);

Expand All @@ -82,3 +81,4 @@ esp_err_t setting_uart();
}
#endif
#endif /* SUBSYS_UART_H */
/* @} */