CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
WifiController.cpp File Reference
#include "cdc_hal/IWifiController.h"
#include "cdc_hal/hw_config.h"
#include "cdc_log.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_mac.h"
#include "esp_system.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "lwip/ip4_addr.h"
#include <cstring>
#include <new>

Go to the source code of this file.

Classes

class  cdc::hal::WifiController

Namespaces

namespace  cdc
namespace  cdc::hal

Macros

#define WIFI_CONNECTED_BIT   BIT0
 Event-group bit definitions for Wi-Fi connection state.
#define WIFI_FAIL_BIT   BIT1
#define WIFI_SCAN_DONE_BIT   BIT2
#define WIFI_GOT_IP_BIT   BIT3

Functions

static void cdc::hal::wifiEventHandler (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData)
 Wi-Fi event callback bridge.
static void cdc::hal::ipEventHandler (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData)
 IP event callback bridge.
IWifiControllercdc::hal::getWifiControllerInstance ()
 Returns the singleton Wi-Fi controller service instance.

Variables

static const char * TAG = "WiFi-Ctrl"
static WifiController cdc::hal::g_wifiController
 Singleton Wi-Fi controller instance.

Macro Definition Documentation

◆ WIFI_CONNECTED_BIT

#define WIFI_CONNECTED_BIT   BIT0

Event-group bit definitions for Wi-Fi connection state.

Definition at line 23 of file WifiController.cpp.

Referenced by cdc::hal::WifiController::connect(), and cdc::hal::WifiController::onWifiEvent().

◆ WIFI_FAIL_BIT

#define WIFI_FAIL_BIT   BIT1

◆ WIFI_GOT_IP_BIT

#define WIFI_GOT_IP_BIT   BIT3

◆ WIFI_SCAN_DONE_BIT

#define WIFI_SCAN_DONE_BIT   BIT2

Variable Documentation

◆ TAG

const char* TAG = "WiFi-Ctrl"
static

ESP32 WiFi Controller Implementation Full WiFi stack management with station and AP modes

Definition at line 20 of file WifiController.cpp.