ChaosDMX
Open-Source DMX-Interface
Loading...
Searching...
No Matches
wifi.c File Reference
#include <string.h>
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_wifi.h"
#include "logger.h"
#include "nvs_flash.h"
#include "wifi.h"
Include dependency graph for wifi.c:

Go to the source code of this file.

Macros

#define LOG_TAG   "WIFI"
 "WIFI" log tag for this file

Functions

esp_err_t wifi_start_ap (const char *ssid, const char *password, uint8_t channel, uint8_t max_connections)
 Start WiFi Access Point (AP) mode.
void wifi_stop_ap (void)
 Stop WiFi Access Point (AP) mode.

Variables

static bool s_wifi_started = false
 Indicates whether the WiFi AP is started.

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "WIFI"

"WIFI" log tag for this file

Definition at line 1 of file wifi.c.

Function Documentation

◆ wifi_start_ap()

esp_err_t wifi_start_ap ( const char * ssid,
const char * password,
uint8_t channel,
uint8_t max_connections )

Start WiFi Access Point (AP) mode.

Initializes and starts the WiFi AP with the given SSID and password.

Parameters
ssidSSID for the AP (1-32 characters)
passwordPassword for the AP (min. 8 characters, optional)
channelWiFi channel to use
max_connectionsMaximum number of client connections
Returns
ESP_OK on success, ESP_ERR_INVALID_ARG or other error codes on failure

Definition at line 29 of file wifi.c.

References LOGI, and s_wifi_started.

Referenced by app_main().

Here is the caller graph for this function:

◆ wifi_stop_ap()

void wifi_stop_ap ( void )

Stop WiFi Access Point (AP) mode.

Deinitializes and stops the WiFi AP.

Definition at line 96 of file wifi.c.

References LOGI, and s_wifi_started.

Variable Documentation

◆ s_wifi_started

bool s_wifi_started = false
static

Indicates whether the WiFi AP is started.

Definition at line 15 of file wifi.c.

Referenced by wifi_start_ap(), and wifi_stop_ap().