Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: WakeUp
Dependents: example-low-power-sleep aconnoCellularGnss
Diff: low_power.cpp
- Revision:
- 3:442c9afc0229
- Parent:
- 1:4f2c412dc013
diff -r c8a0c0e328db -r 442c9afc0229 low_power.cpp
--- a/low_power.cpp Mon Apr 10 11:50:47 2017 +0000
+++ b/low_power.cpp Tue Apr 11 09:57:37 2017 +0000
@@ -34,22 +34,22 @@
# include <stdio.h>
#endif
-// ----------------------------------------------------------------
-// COMPILE-TIME MACROS
-// ----------------------------------------------------------------
+/* ----------------------------------------------------------------
+ * COMPILE-TIME MACROS
+ * -------------------------------------------------------------- */
-/// Location of backup SRAM in memory (on STM23F4, has no effect otherwise).
+// Location of backup SRAM in memory (on STM23F4, has no effect otherwise).
#define BACKUP_SRAM_START_ADDRESS ((uint32_t *) ((uint32_t) BKPSRAM_BASE))
-// ----------------------------------------------------------------
-// PRIVATE VARIABLES
-// ----------------------------------------------------------------
+/* ----------------------------------------------------------------
+ * PRIVATE VARIABLES
+ * -------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------
+ * PRIVATE FUNCTIONS
+ * -------------------------------------------------------------- */
-// ----------------------------------------------------------------
-// PRIVATE FUNCTIONS
-// ----------------------------------------------------------------
-
-/// Check whether an interrupt is enabled or not.
+// Check whether an interrupt is enabled or not.
inline uint32_t LowPower::myNVIC_GetEnableIRQ(IRQn_Type IRQn)
{
if ((int32_t)(IRQn) >= 0) {
@@ -59,11 +59,11 @@
}
}
-//----------------------------------------------------------------
-// PUBLIC FUNCTIONS
-// ----------------------------------------------------------------
+/* ----------------------------------------------------------------
+ * PUBLIC FUNCTIONS
+ * -------------------------------------------------------------- */
-/// Constructor.
+// Constructor.
LowPower::LowPower(void)
{
#ifdef TARGET_STM
@@ -83,12 +83,12 @@
#endif
}
-/// Destructor.
+// Destructor.
LowPower::~LowPower(void)
{
}
-/// Enter Stop mode.
+// Enter Stop mode.
void LowPower::enterStop(uint32_t stopPeriodMilliseconds)
{
if (stopPeriodMilliseconds > 0) {
@@ -122,7 +122,7 @@
}
}
-/// Enter Standby mode.
+// Enter Standby mode.
void LowPower::enterStandby(uint32_t standbyPeriodMilliseconds, bool powerDownBackupSram)
{
if (standbyPeriodMilliseconds > 0) {
@@ -164,7 +164,7 @@
}
}
-/// Get the number of user interrupts that are enabled.
+// Get the number of user interrupts that are enabled.
int32_t LowPower::numUserInterruptsEnabled(uint8_t *pList, uint32_t sizeOfList)
{
int32_t userInterruptsEnabled = 0;
@@ -196,7 +196,7 @@
return userInterruptsEnabled;
}
-/// Exit debug mode.
+// Exit debug mode.
void LowPower::exitDebugMode(void)
{
#ifdef TARGET_STM
@@ -213,4 +213,4 @@
#endif
}
-// End Of File
+/* End Of File */