Skip to content

Commit 47fa231

Browse files
committed
Updates requested in pull request discussion to remove guards and fix #include locations
1 parent cac01d3 commit 47fa231

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

libraries/WiFi/src/WiFiGeneric.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
#include "esp_smartconfig.h"
3232
#include "wifi_provisioning/manager.h"
3333

34-
#ifdef ENABLE_WPA2_AUTHENTICATION
35-
#include <WiFiClient.h>
36-
#include <WiFiClientSecure.h>
37-
#include "esp_wpa2.h"
38-
#endif
39-
4034
ESP_EVENT_DECLARE_BASE(ARDUINO_EVENTS);
4135

4236
typedef enum {

libraries/WiFi/src/WiFiSTA.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "WiFi.h"
2626
#include "WiFiGeneric.h"
2727
#include "WiFiSTA.h"
28+
#include <WiFiClientSecure.h>
2829

2930
extern "C" {
3031
#include <stdint.h>
@@ -42,6 +43,7 @@ extern "C" {
4243
#include "lwip/dns.h"
4344
#include <esp_smartconfig.h>
4445
#include <esp_netif.h>
46+
#include "esp_wpa2.h"
4547
}
4648

4749
// -----------------------------------------------------------------------------------------------------------------------
@@ -146,7 +148,6 @@ wl_status_t WiFiSTAClass::status()
146148
}
147149

148150

149-
#ifdef ENABLE_WPA2_AUTHENTICATION
150151
static WiFiClientSecure client_secure;
151152

152153
/**
@@ -213,9 +214,6 @@ wl_status_t WiFiSTAClass::begin(const char* wpa2_ssid, const char* wpa2_identity
213214
}
214215
return status();
215216
}
216-
#endif
217-
218-
219217

220218
/**
221219
* Start Wifi connection

libraries/WiFi/src/WiFiSTA.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ class WiFiSTAClass
3939

4040
public:
4141

42-
#ifdef ENABLE_WPA2_AUTHENTICATION
4342
wl_status_t begin(const char* wpa2_ssid, const char* wpa2_identity, const char* wpa2_username, const char *wpa2_password, const char* root_ca=NULL, const char* client_cert=NULL, const char* client_key=NULL,int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
44-
#endif
4543
wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
4644
wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
4745
wl_status_t begin();

0 commit comments

Comments
 (0)