Skip to content

Commit 1670a48

Browse files
committed
fix(wifi): Fix requirements and guards for hosted Wi-Fi
1 parent 9f3010f commit 1670a48

File tree

17 files changed

+69
-27
lines changed

17 files changed

+69
-27
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}

libraries/ESP_NOW/src/ESP32_NOW.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#include "sdkconfig.h"
2+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
3+
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
4+
#else
5+
16
#include "ESP32_NOW.h"
27
#include <string.h>
38
#include "esp_system.h"
@@ -406,3 +411,5 @@ size_t ESP_NOW_Peer::send(const uint8_t *data, int len) {
406411
ESP_NOW_Peer::operator bool() const {
407412
return added;
408413
}
414+
415+
#endif

libraries/ESP_NOW/src/ESP32_NOW.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
#pragma once
22

3+
#include "sdkconfig.h"
4+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
5+
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
6+
#else
7+
38
#include "esp_wifi_types.h"
49
#include "Print.h"
510
#include "esp_now.h"
611
#include "esp32-hal-log.h"
712
#include "esp_mac.h"
813

14+
15+
916
class ESP_NOW_Peer; //forward declaration for friend function
1017

1118
class ESP_NOW_Class : public Print {
@@ -77,3 +84,5 @@ class ESP_NOW_Peer {
7784
};
7885

7986
extern ESP_NOW_Class ESP_NOW;
87+
88+
#endif

libraries/ESP_NOW/src/ESP32_NOW_Serial.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#include "sdkconfig.h"
2+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
3+
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
4+
#else
5+
16
#include "ESP32_NOW_Serial.h"
27
#include <string.h>
38
#include "esp_now.h"
@@ -277,3 +282,5 @@ void ESP_NOW_Serial_Class::onSent(bool success) {
277282
}
278283
}
279284
}
285+
286+
#endif

libraries/ESP_NOW/src/ESP32_NOW_Serial.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#pragma once
22

3+
#include "sdkconfig.h"
4+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
5+
#warning "ESP-NOW is only supported in SoCs with native Wi-Fi support"
6+
#else
7+
38
#include "esp_wifi_types.h"
49
#include "freertos/FreeRTOS.h"
510
#include "freertos/task.h"
@@ -48,3 +53,5 @@ class ESP_NOW_Serial_Class : public Stream, public ESP_NOW_Peer {
4853
void onReceive(const uint8_t *data, size_t len, bool broadcast);
4954
void onSent(bool success);
5055
};
56+
57+
#endif

libraries/HTTPClient/examples/HTTPClientEnterprise/HTTPClientEnterprise.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
/*|TESTED BOARDS: Devkit v1 DOIT, Devkitc v4 |*/
44
/*|CORE: June 2018 |*/
55
/*|----------------------------------------------------------|*/
6+
7+
#include "sdkconfig.h"
8+
#if CONFIG_ESP_WIFI_REMOTE_ENABLED
9+
#error "WPA-Enterprise is only supported in SoCs with native Wi-Fi support"
10+
#endif
11+
612
#include <WiFi.h>
713
#include <HTTPClient.h>
814
#if __has_include("esp_eap_client.h")
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"requires_any": [
3-
"CONFIG_SOC_WIFI_SUPPORTED=y",
4-
"CONFIG_ESP_WIFI_REMOTE_ENABLED=y"
2+
"requires": [
3+
"CONFIG_SOC_WIFI_SUPPORTED=y"
54
]
65
}

0 commit comments

Comments
 (0)