Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
19ccc479
Unverified
Commit
19ccc479
authored
Sep 30, 2020
by
lbernstone
Committed by
GitHub
Sep 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIFI_PS_MAX_MODEM feature requested #3896 (#3900)
parent
c18d50cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
libraries/WiFi/src/WiFiGeneric.cpp
libraries/WiFi/src/WiFiGeneric.cpp
+14
-0
libraries/WiFi/src/WiFiGeneric.h
libraries/WiFi/src/WiFiGeneric.h
+1
-0
No files found.
libraries/WiFi/src/WiFiGeneric.cpp
View file @
19ccc479
...
...
@@ -639,6 +639,20 @@ bool WiFiGenericClass::setSleep(bool enable)
return
esp_wifi_set_ps
(
enable
?
WIFI_PS_MIN_MODEM
:
WIFI_PS_NONE
)
==
ESP_OK
;
}
/**
* control modem sleep when only in STA mode
* @param mode wifi_ps_type_t
* @return ok
*/
bool
WiFiGenericClass
::
setSleep
(
wifi_ps_type_t
mode
)
{
if
((
getMode
()
&
WIFI_MODE_STA
)
==
0
){
log_w
(
"STA has not been started"
);
return
false
;
}
return
esp_wifi_set_ps
(
mode
)
==
ESP_OK
;
}
/**
* get modem sleep enabled
* @return true if modem sleep is enabled
...
...
libraries/WiFi/src/WiFiGeneric.h
View file @
19ccc479
...
...
@@ -108,6 +108,7 @@ class WiFiGenericClass
bool
enableAP
(
bool
enable
);
bool
setSleep
(
bool
enable
);
bool
setSleep
(
wifi_ps_type_t
mode
);
bool
getSleep
();
bool
setTxPower
(
wifi_power_t
power
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment