fix(wifi): Fix requirements and guards for hosted Wi-Fi (#10579)

* fix(wifi): Fix requirements and guards for hosted Wi-Fi

* ci(pre-commit): Apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
This commit is contained in:
Lucas Saavedra Vaz 2024-11-06 19:31:29 -03:00 committed by GitHub
parent c0092206a6
commit 32e2230de2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 67 additions and 27 deletions

View file

@ -1,6 +1,5 @@
{
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -1,6 +1,5 @@
{
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -1,6 +1,5 @@
{
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -1,6 +1,5 @@
{
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -1,3 +1,8 @@
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
#else
#include "ESP32_NOW.h"
#include <string.h>
#include "esp_system.h"
@ -406,3 +411,5 @@ size_t ESP_NOW_Peer::send(const uint8_t *data, int len) {
ESP_NOW_Peer::operator bool() const {
return added;
}
#endif

View file

@ -1,5 +1,10 @@
#pragma once
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
#else
#include "esp_wifi_types.h"
#include "Print.h"
#include "esp_now.h"
@ -77,3 +82,5 @@ public:
};
extern ESP_NOW_Class ESP_NOW;
#endif

View file

@ -1,3 +1,8 @@
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
#else
#include "ESP32_NOW_Serial.h"
#include <string.h>
#include "esp_now.h"
@ -277,3 +282,5 @@ void ESP_NOW_Serial_Class::onSent(bool success) {
}
}
}
#endif

View file

@ -1,5 +1,10 @@
#pragma once
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
#else
#include "esp_wifi_types.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@ -48,3 +53,5 @@ public:
void onReceive(const uint8_t *data, size_t len, bool broadcast);
void onSent(bool success);
};
#endif

View file

@ -3,6 +3,12 @@
/*|TESTED BOARDS: Devkit v1 DOIT, Devkitc v4 |*/
/*|CORE: June 2018 |*/
/*|----------------------------------------------------------|*/
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#error "WPA-Enterprise is only supported in SoCs with native Wi-Fi support"
#endif
#include <WiFi.h>
#include <HTTPClient.h>
#if __has_include("esp_eap_client.h")

View file

@ -1,7 +1,6 @@
{
"fqbn_append": "PartitionScheme=huge_app",
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -13,6 +13,11 @@
// Note: this example is outdated and may not work!
// For more examples see https://github.com/martinius96/ESP32-eduroam
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#error "WPA-Enterprise is only supported in SoCs with native Wi-Fi support"
#endif
#include <WiFi.h>
#include <NetworkClientSecure.h>
#if __has_include("esp_eap_client.h")

View file

@ -1,7 +1,6 @@
{
"fqbn_append": "PartitionScheme=huge_app",
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -14,6 +14,11 @@ Author:
Pranav Cherukupalli <cherukupallip@gmail.com>
*/
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#error "WPS is only supported in SoCs with native Wi-Fi support"
#endif
#include "WiFi.h"
#include "esp_wps.h"
/*

View file

@ -1,6 +1,5 @@
{
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -1,3 +1,8 @@
#include "sdkconfig.h"
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
#error "SmartConfig is only supported in SoCs with native Wi-Fi support"
#endif
#include "WiFi.h"
void setup() {

View file

@ -1,6 +1,5 @@
{
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}

View file

@ -21,8 +21,7 @@
"hardware": false,
"qemu": false
},
"requires_any": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y"
]
}