Skip to content

Commit eaf1dcb

Browse files
authored
Merge pull request #96 from sandeepmistry/remove-sleepFor
Remove WiFi.sleepFor(ms) and WiFi.isAwake() for now
2 parents 9030320 + ce130d5 commit eaf1dcb

File tree

4 files changed

+0
-174
lines changed

4 files changed

+0
-174
lines changed

examples/WiFiSleepingWebClient/WiFiSleepingWebClient.ino

Lines changed: 0 additions & 155 deletions
This file was deleted.

keywords.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ WiFiMDNSResponder KEYWORD2
4747
lowPowerMode KEYWORD2
4848
maxLowPowerMode KEYWORD2
4949
noLowPowerMode KEYWORD2
50-
sleepFor KEYWORD2
51-
isAwake KEYWORD2
5250

5351
#######################################
5452
# Constants (LITERAL1)

src/WiFi.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ WiFiClass::WiFiClass()
183183
_mode = WL_RESET_MODE;
184184
_status = WL_NO_SHIELD;
185185
_init = 0;
186-
_wakeUpMillis = 0;
187186
}
188187

189188
void WiFiClass::setPins(int8_t cs, int8_t irq, int8_t rst, int8_t en)
@@ -798,18 +797,6 @@ void WiFiClass::noLowPowerMode(void)
798797
m2m_wifi_set_sleep_mode(M2M_NO_PS, false);
799798
}
800799

801-
void WiFiClass::sleepFor(uint32_t thisTime)
802-
{
803-
m2m_wifi_set_sleep_mode(M2M_PS_MANUAL, false);
804-
_wakeUpMillis = millis() + thisTime + 150; //150 ms must elapse for complete awakening
805-
m2m_wifi_request_sleep(thisTime);
806-
}
807-
808-
bool WiFiClass::isAwake(void)
809-
{
810-
return (millis() > _wakeUpMillis);
811-
}
812-
813800
uint8_t WiFiClass::ping(const char* hostname, uint8_t ttl)
814801
{
815802
IPAddress ip;

src/WiFi101.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,11 @@ class WiFiClass
160160
void lowPowerMode(void);
161161
void maxLowPowerMode(void);
162162
void noLowPowerMode(void);
163-
void sleepFor(uint32_t thisTime);
164-
bool isAwake(void);
165163

166164
private:
167165
int _init;
168166
char _version[9];
169167

170-
uint32_t _wakeUpMillis;
171-
172168
uint8_t startConnect(const char *ssid, uint8_t u8SecType, const void *pvAuthInfo);
173169
uint8_t startAP(const char *ssid, uint8_t u8SecType, const void *pvAuthInfo, uint8_t channel);
174170
};

0 commit comments

Comments
 (0)