- Notifications
You must be signed in to change notification settings - Fork220
Add function to manage low power mode status#327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Add function to manage low power mode status#327
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sebromero left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for the PR! I'd recommend naming the user facing functionsetLowPowerModeEnabled
or as discusseddisableLowPowerMode()
if re-enabling it makes no sense. For the other functions I suggest avoiding abbreviations that leave room for ambiguity.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Sebastian Romero <s.romero.zh@gmail.com>
Co-authored-by: Sebastian Romero <s.romero.zh@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
Adding the function
BLE.setLowPowerMode(bool)
to manage the lower power mode status of the BLE chip.The function
BLE.setLowPowerMode(bool)
(true
: to enable,false
: to disable) must be called before executing theBLE.begin()
function. Using this function after the BLE stack initialization will not have any effect.The function does not directly control the entry and exit from low power mode but enables or disables the chip's feature.
Low power mode is enabled by default.
@sebromero Check it out if function name sounds good. Another proposal could be using two different functions:
enableLowPowerMode()
anddisableLowPowerMode()
.This PR is based on thearduino/mbed-os PR #32.