From ba55155132ca7f2c20f5ab12ba7a7d7e5fa4b3a6 Mon Sep 17 00:00:00 2001 From: Cossid Date: Sat, 18 Nov 2023 21:51:01 -0600 Subject: [PATCH] Formatting. --- .../arduino/libraries/WiFi/WiFi.cpp | 4 ++-- .../arduino/libraries/WiFi/WiFiPrivate.h | 4 ++-- .../arduino/libraries/WiFi/WiFiSTA.cpp | 24 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cores/beken-72xx/arduino/libraries/WiFi/WiFi.cpp b/cores/beken-72xx/arduino/libraries/WiFi/WiFi.cpp index 4361facc9..32f7d2e15 100644 --- a/cores/beken-72xx/arduino/libraries/WiFi/WiFi.cpp +++ b/cores/beken-72xx/arduino/libraries/WiFi/WiFi.cpp @@ -5,8 +5,8 @@ WiFiClass::WiFiClass() { data = (WiFiData *)calloc(1, sizeof(WiFiData)); - DATA->scanSem = xSemaphoreCreateBinary(); - STA_CFG.dhcp_mode = DHCP_CLIENT; + DATA->scanSem = xSemaphoreCreateBinary(); + STA_CFG.dhcp_mode = DHCP_CLIENT; STA_ADV_CFG.dhcp_mode = DHCP_CLIENT; } diff --git a/cores/beken-72xx/arduino/libraries/WiFi/WiFiPrivate.h b/cores/beken-72xx/arduino/libraries/WiFi/WiFiPrivate.h index 630f23f82..38ec80c00 100644 --- a/cores/beken-72xx/arduino/libraries/WiFi/WiFiPrivate.h +++ b/cores/beken-72xx/arduino/libraries/WiFi/WiFiPrivate.h @@ -73,8 +73,8 @@ typedef struct { #define pDATA ((WiFiData *)pWiFi->data) #define cDATA ((WiFiData *)cls->data) -#define STA_CFG (DATA->configSta) -#define STA_ADV_CFG (DATA->configStaAdv) +#define STA_CFG (DATA->configSta) +#define STA_ADV_CFG (DATA->configStaAdv) #define AP_CFG (DATA->configAp) #define IP_STATUS (DATA->statusIp) #define LINK_STATUS (DATA->statusLink) diff --git a/cores/beken-72xx/arduino/libraries/WiFi/WiFiSTA.cpp b/cores/beken-72xx/arduino/libraries/WiFi/WiFiSTA.cpp index faabb4df3..43fd38a89 100644 --- a/cores/beken-72xx/arduino/libraries/WiFi/WiFiSTA.cpp +++ b/cores/beken-72xx/arduino/libraries/WiFi/WiFiSTA.cpp @@ -20,10 +20,10 @@ WiFiClass::begin(const char *ssid, const char *passphrase, int32_t channel, cons strcpy(STA_ADV_CFG.key, passphrase); STA_ADV_CFG.key_len = strlen(passphrase); } else { - STA_ADV_CFG.key[0] = '\0'; + STA_ADV_CFG.key[0] = '\0'; STA_ADV_CFG.key_len = 0; } - STA_ADV_CFG.ap_info.channel = channel; + STA_ADV_CFG.ap_info.channel = channel; STA_ADV_CFG.wifi_retry_interval = 100; } else { strcpy(STA_CFG.wifi_ssid, ssid); @@ -34,7 +34,7 @@ WiFiClass::begin(const char *ssid, const char *passphrase, int32_t channel, cons STA_CFG.wifi_key[0] = '\0'; } STA_CFG.wifi_retry_interval = 100; - STA_CFG.wifi_mode = BK_STATION; + STA_CFG.wifi_mode = BK_STATION; } if (reconnect(bssid)) @@ -44,7 +44,7 @@ WiFiClass::begin(const char *ssid, const char *passphrase, int32_t channel, cons } bool WiFiClass::config(IPAddress localIP, IPAddress gateway, IPAddress subnet, IPAddress dns1, IPAddress dns2) { - STA_CFG.dhcp_mode = localIP ? DHCP_DISABLE : DHCP_CLIENT; + STA_CFG.dhcp_mode = localIP ? DHCP_DISABLE : DHCP_CLIENT; STA_ADV_CFG.dhcp_mode = localIP ? DHCP_DISABLE : DHCP_CLIENT; if (localIP) { sprintf(STA_CFG.local_ip_addr, IP_FMT, localIP[0], localIP[1], localIP[2], localIP[3]); @@ -57,17 +57,17 @@ bool WiFiClass::config(IPAddress localIP, IPAddress gateway, IPAddress subnet, I sprintf(STA_CFG.dns_server_ip_addr, IP_FMT, dns1[0], dns1[1], dns1[2], dns1[3]); sprintf(STA_ADV_CFG.dns_server_ip_addr, IP_FMT, dns1[0], dns1[1], dns1[2], dns1[3]); } else { - STA_CFG.dns_server_ip_addr[0] = '\0'; + STA_CFG.dns_server_ip_addr[0] = '\0'; STA_ADV_CFG.dns_server_ip_addr[0] = '\0'; } } else { - STA_CFG.local_ip_addr[0] = '\0'; - STA_CFG.net_mask[0] = '\0'; - STA_CFG.gateway_ip_addr[0] = '\0'; - STA_CFG.dns_server_ip_addr[0] = '\0'; - STA_ADV_CFG.local_ip_addr[0] = '\0'; - STA_ADV_CFG.net_mask[0] = '\0'; - STA_ADV_CFG.gateway_ip_addr[0] = '\0'; + STA_CFG.local_ip_addr[0] = '\0'; + STA_CFG.net_mask[0] = '\0'; + STA_CFG.gateway_ip_addr[0] = '\0'; + STA_CFG.dns_server_ip_addr[0] = '\0'; + STA_ADV_CFG.local_ip_addr[0] = '\0'; + STA_ADV_CFG.net_mask[0] = '\0'; + STA_ADV_CFG.gateway_ip_addr[0] = '\0'; STA_ADV_CFG.dns_server_ip_addr[0] = '\0'; }