mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-04-09 03:11:29 +00:00
add doxygen and header guards
This commit is contained in:
parent
f30fa4f130
commit
472b478afe
8 changed files with 126 additions and 21 deletions
|
|
@ -1,6 +1,4 @@
|
|||
#define LOG_TAG "WIFI"
|
||||
|
||||
#include "wifi.h"
|
||||
#define LOG_TAG "WIFI" ///< "WIFI" log tag for this file
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
@ -9,9 +7,25 @@
|
|||
#include "esp_wifi.h"
|
||||
#include "logger.h"
|
||||
#include "nvs_flash.h"
|
||||
#include "wifi.h"
|
||||
|
||||
/**
|
||||
* @brief Indicates whether the WiFi AP is started.
|
||||
*/
|
||||
static bool s_wifi_started = false;
|
||||
|
||||
/**
|
||||
* @brief Start WiFi Access Point (AP) mode.
|
||||
*
|
||||
* Initializes and starts the WiFi AP with the given SSID and password.
|
||||
*
|
||||
* @param ssid SSID for the AP (1-32 characters)
|
||||
* @param password Password for the AP (min. 8 characters, optional)
|
||||
* @param channel WiFi channel to use
|
||||
* @param max_connections Maximum number of client connections
|
||||
* @return ESP_OK on success, ESP_ERR_INVALID_ARG or other error codes on
|
||||
* failure
|
||||
*/
|
||||
esp_err_t wifi_start_ap(const char *ssid, const char *password, uint8_t channel,
|
||||
uint8_t max_connections) {
|
||||
if (s_wifi_started) {
|
||||
|
|
@ -74,6 +88,11 @@ esp_err_t wifi_start_ap(const char *ssid, const char *password, uint8_t channel,
|
|||
return ESP_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Stop WiFi Access Point (AP) mode.
|
||||
*
|
||||
* Deinitializes and stops the WiFi AP.
|
||||
*/
|
||||
void wifi_stop_ap(void) {
|
||||
if (!s_wifi_started) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue