ArduinoBLE icon indicating copy to clipboard operation
ArduinoBLE copied to clipboard

Add function to manage low power mode status

Open leonardocavagnis opened this issue 2 years ago • 0 comments

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 the BLE.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() and disableLowPowerMode().

This PR is based on the arduino/mbed-os PR #32.

leonardocavagnis avatar Oct 11 '23 15:10 leonardocavagnis