Added WiFi kernel drivers and refactored Wifi service (#557)

+ other improvements
This commit is contained in:
Ken Van Hoeylandt
2026-07-09 21:03:38 +02:00
committed by GitHub
parent dbb96a891c
commit 1c2806bddf
104 changed files with 2347 additions and 1428 deletions
@@ -22,6 +22,10 @@ extern Driver esp32_sdspi_driver;
extern Driver esp32_spi_driver;
extern Driver esp32_uart_driver;
extern Driver esp32_grove_driver;
#if defined(CONFIG_SOC_WIFI_SUPPORTED) || defined(CONFIG_SLAVE_SOC_WIFI_SUPPORTED)
extern Driver esp32_wifi_driver;
extern Driver esp32_wifi_pinned_driver;
#endif
#if defined(CONFIG_BT_NIMBLE_ENABLED)
extern Driver esp32_bluetooth_driver;
extern Driver esp32_ble_serial_driver;
@@ -49,6 +53,10 @@ static error_t start() {
check(driver_construct_add(&esp32_spi_driver) == ERROR_NONE);
check(driver_construct_add(&esp32_uart_driver) == ERROR_NONE);
check(driver_construct_add(&esp32_grove_driver) == ERROR_NONE);
#if defined(CONFIG_SOC_WIFI_SUPPORTED) || defined(CONFIG_SLAVE_SOC_WIFI_SUPPORTED)
check(driver_construct_add(&esp32_wifi_driver) == ERROR_NONE);
check(driver_construct_add(&esp32_wifi_pinned_driver) == ERROR_NONE);
#endif
#if defined(CONFIG_BT_NIMBLE_ENABLED)
check(driver_construct_add(&esp32_bluetooth_driver) == ERROR_NONE);
check(driver_construct_add(&esp32_ble_serial_driver) == ERROR_NONE);
@@ -67,6 +75,10 @@ static error_t start() {
static error_t stop() {
/* We crash when destruct fails, because if a single driver fails to destruct,
* there is no guarantee that the previously destroyed drivers can be recovered */
#if defined(CONFIG_SOC_WIFI_SUPPORTED) || defined(CONFIG_SLAVE_SOC_WIFI_SUPPORTED)
check(driver_remove_destruct(&esp32_wifi_pinned_driver) == ERROR_NONE);
check(driver_remove_destruct(&esp32_wifi_driver) == ERROR_NONE);
#endif
#if SOC_USB_OTG_SUPPORTED
check(driver_remove_destruct(&esp32_usbhost_msc_driver) == ERROR_NONE);
check(driver_remove_destruct(&esp32_usbhost_midi_driver) == ERROR_NONE);