Skip to content

Remove mbed power management deprecated API #12551

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/FEATURE_BLE/targets/TARGET_Maxim/MaximBLE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ void MaximBLE::waitForEvent(void)

// go to sleep
if (hciDrvReadyToSleep()) {
// go to deep sleep
deepsleep();
// go to sleep
sleep();
hciDrvResume();
}
else {
Expand Down
28 changes: 0 additions & 28 deletions platform/mbed_power_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,34 +201,6 @@ static inline void sleep(void)
#endif /* DEVICE_SLEEP */
}

/** Send the microcontroller to deep sleep
*
* @deprecated
* Do not use this function. Applications should use sleep() API which puts the system in deepsleep mode if supported.
*
* @note This function can be a noop if not implemented by the platform.
* @note This function will be a noop in debug mode (debug build profile when MBED_DEBUG is defined)
*
* This processor is setup ready for deep sleep, and sent to sleep. This mode
* has the same sleep features as sleep plus it powers down peripherals and clocks. All state
* is still maintained.
*
* The processor can only be woken up by an external interrupt on a pin or a watchdog timer.
*
* @note
* The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
* Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
* able to access the LocalFileSystem
*/

MBED_DEPRECATED_SINCE("mbed-os-5.6", "One entry point for an application, use sleep()")
static inline void deepsleep(void)
{
#if DEVICE_SLEEP
sleep_manager_sleep_auto();
#endif /* DEVICE_SLEEP */
}

/** Provides the time spent in sleep mode since boot.
*
* @return Time spent in sleep
Expand Down