ESP32 Wi-Fi controller. More...
#include "esp_private/wifi.h"#include "core/net.h"#include "drivers/wifi/esp32_wifi_driver.h"#include "debug.h"Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL NIC_TRACE_LEVEL |
Functions | |
| esp_err_t | esp32WifiStaRxCallback (void *buffer, uint16_t length, void *eb) |
| Process incoming packets (STA interface) More... | |
| esp_err_t | esp32WifiApRxCallback (void *buffer, uint16_t length, void *eb) |
| Process incoming packets (AP interface) More... | |
| void | esp32WifiStaStartEvent (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData) |
| Station start (event handler) More... | |
| void | esp32WifiStaStopEvent (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData) |
| Station stop (event handler) More... | |
| void | esp32WifiStaConnectedEvent (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData) |
| Station connected to AP (event handler) More... | |
| void | esp32WifiStaDisconnectedEvent (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData) |
| Station disconnected from AP (event handler) More... | |
| void | esp32WifiApStartEvent (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData) |
| Soft-AP start (event handler) More... | |
| void | esp32WifiApStopEvent (void *arg, esp_event_base_t eventBase, int32_t eventId, void *eventData) |
| Soft-AP stop (event handler) More... | |
| error_t | esp32WifiInit (NetInterface *interface) |
| ESP32_WIFI initialization. More... | |
| void | esp32WifiTick (NetInterface *interface) |
| ESP32 Wi-Fi timer handler. More... | |
| void | esp32WifiEnableIrq (NetInterface *interface) |
| Enable interrupts. More... | |
| void | esp32WifiDisableIrq (NetInterface *interface) |
| Disable interrupts. More... | |
| void | esp32WifiEventHandler (NetInterface *interface) |
| ESP32 Wi-Fi event handler. More... | |
| error_t | esp32WifiSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary) |
| Send a packet. More... | |
| error_t | esp32WifiUpdateMacAddrFilter (NetInterface *interface) |
| Configure MAC address filtering. More... | |
Variables | |
| const NicDriver | esp32WifiStaDriver |
| ESP32 Wi-Fi driver (STA mode) More... | |
| const NicDriver | esp32WifiApDriver |
| ESP32 Wi-Fi driver (AP mode) More... | |
Detailed Description
ESP32 Wi-Fi controller.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.5.4
Definition in file esp32_wifi_driver.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL NIC_TRACE_LEVEL |
Definition at line 32 of file esp32_wifi_driver.c.
Function Documentation
◆ esp32WifiApRxCallback()
| esp_err_t esp32WifiApRxCallback | ( | void * | buffer, |
| uint16_t | length, | ||
| void * | eb | ||
| ) |
Process incoming packets (AP interface)
- Parameters
-
[in] buffer Incoming packet [in] length Length of the packet, in bytes [in] eb Pointer to the buffer allocated by the Wi-Fi driver
- Returns
- Error code
Definition at line 396 of file esp32_wifi_driver.c.
◆ esp32WifiApStartEvent()
| void esp32WifiApStartEvent | ( | void * | arg, |
| esp_event_base_t | eventBase, | ||
| int32_t | eventId, | ||
| void * | eventData | ||
| ) |
Soft-AP start (event handler)
- Parameters
-
[in] arg User-specific parameter [in] eventBase Event base [in] eventId Event identifier [in] eventData Event-specific data
Definition at line 546 of file esp32_wifi_driver.c.
◆ esp32WifiApStopEvent()
| void esp32WifiApStopEvent | ( | void * | arg, |
| esp_event_base_t | eventBase, | ||
| int32_t | eventId, | ||
| void * | eventData | ||
| ) |
Soft-AP stop (event handler)
- Parameters
-
[in] arg User-specific parameter [in] eventBase Event base [in] eventId Event identifier [in] eventData Event-specific data
Definition at line 585 of file esp32_wifi_driver.c.
◆ esp32WifiDisableIrq()
| void esp32WifiDisableIrq | ( | NetInterface * | interface | ) |
Disable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 270 of file esp32_wifi_driver.c.
◆ esp32WifiEnableIrq()
| void esp32WifiEnableIrq | ( | NetInterface * | interface | ) |
Enable interrupts.
- Parameters
-
[in] interface Underlying network interface
Definition at line 260 of file esp32_wifi_driver.c.
◆ esp32WifiEventHandler()
| void esp32WifiEventHandler | ( | NetInterface * | interface | ) |
ESP32 Wi-Fi event handler.
- Parameters
-
[in] interface Underlying network interface
Definition at line 280 of file esp32_wifi_driver.c.
◆ esp32WifiInit()
| error_t esp32WifiInit | ( | NetInterface * | interface | ) |
ESP32_WIFI initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 123 of file esp32_wifi_driver.c.
◆ esp32WifiSendPacket()
| error_t esp32WifiSendPacket | ( | NetInterface * | interface, |
| const NetBuffer * | buffer, | ||
| size_t | offset, | ||
| NetTxAncillary * | ancillary | ||
| ) |
Send a packet.
- Parameters
-
[in] interface Underlying network interface [in] buffer Multi-part buffer containing the data to send [in] offset Offset to the first data byte [in] ancillary Additional options passed to the stack along with the packet
- Returns
- Error code
Definition at line 295 of file esp32_wifi_driver.c.
◆ esp32WifiStaConnectedEvent()
| void esp32WifiStaConnectedEvent | ( | void * | arg, |
| esp_event_base_t | eventBase, | ||
| int32_t | eventId, | ||
| void * | eventData | ||
| ) |
Station connected to AP (event handler)
- Parameters
-
[in] arg User-specific parameter [in] eventBase Event base [in] eventId Event identifier [in] eventData Event-specific data
Definition at line 468 of file esp32_wifi_driver.c.
◆ esp32WifiStaDisconnectedEvent()
| void esp32WifiStaDisconnectedEvent | ( | void * | arg, |
| esp_event_base_t | eventBase, | ||
| int32_t | eventId, | ||
| void * | eventData | ||
| ) |
Station disconnected from AP (event handler)
- Parameters
-
[in] arg User-specific parameter [in] eventBase Event base [in] eventId Event identifier [in] eventData Event-specific data
Definition at line 507 of file esp32_wifi_driver.c.
◆ esp32WifiStaRxCallback()
| esp_err_t esp32WifiStaRxCallback | ( | void * | buffer, |
| uint16_t | length, | ||
| void * | eb | ||
| ) |
Process incoming packets (STA interface)
- Parameters
-
[in] buffer Incoming packet [in] length Length of the packet, in bytes [in] eb Pointer to the buffer allocated by the Wi-Fi driver
- Returns
- Error code
Definition at line 356 of file esp32_wifi_driver.c.
◆ esp32WifiStaStartEvent()
| void esp32WifiStaStartEvent | ( | void * | arg, |
| esp_event_base_t | eventBase, | ||
| int32_t | eventId, | ||
| void * | eventData | ||
| ) |
Station start (event handler)
- Parameters
-
[in] arg User-specific parameter [in] eventBase Event base [in] eventId Event identifier [in] eventData Event-specific data
Definition at line 436 of file esp32_wifi_driver.c.
◆ esp32WifiStaStopEvent()
| void esp32WifiStaStopEvent | ( | void * | arg, |
| esp_event_base_t | eventBase, | ||
| int32_t | eventId, | ||
| void * | eventData | ||
| ) |
Station stop (event handler)
- Parameters
-
[in] arg User-specific parameter [in] eventBase Event base [in] eventId Event identifier [in] eventData Event-specific data
Definition at line 452 of file esp32_wifi_driver.c.
◆ esp32WifiTick()
| void esp32WifiTick | ( | NetInterface * | interface | ) |
ESP32 Wi-Fi timer handler.
This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state
- Parameters
-
[in] interface Underlying network interface
Definition at line 250 of file esp32_wifi_driver.c.
◆ esp32WifiUpdateMacAddrFilter()
| error_t esp32WifiUpdateMacAddrFilter | ( | NetInterface * | interface | ) |
Configure MAC address filtering.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 341 of file esp32_wifi_driver.c.
Variable Documentation
◆ esp32WifiApDriver
| const NicDriver esp32WifiApDriver |
ESP32 Wi-Fi driver (AP mode)
Definition at line 96 of file esp32_wifi_driver.c.
