mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
548:1abac31e188e
Parent:
526:7c4bdfe6a168
Child:
627:4fa1328d9c60
--- a/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/sleep.c	Fri May 22 09:45:08 2015 +0100
+++ b/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/sleep.c	Fri May 22 10:45:46 2015 +0100
@@ -34,19 +34,19 @@
  */
 void sleep(void)
 {
-	if (sleep_block_counter[0] > 0) {
-		// Blocked everything below EM0, so just return
-		return;
-	} else if (sleep_block_counter[1] > 0) {
-		// Blocked everything below EM1, enter EM1
-		EMU_EnterEM1();
-	} else if (sleep_block_counter[2] > 0) {
-		// Blocked everything below EM2, enter EM2
-		EMU_EnterEM2(true);
-	} else if (sleep_block_counter[3] > 0) {
-		// Blocked everything below EM3, enter EM3
-		EMU_EnterEM3(true);
-	}
+    if (sleep_block_counter[0] > 0) {
+        // Blocked everything below EM0, so just return
+        return;
+    } else if (sleep_block_counter[1] > 0) {
+        // Blocked everything below EM1, enter EM1
+        EMU_EnterEM1();
+    } else if (sleep_block_counter[2] > 0) {
+        // Blocked everything below EM2, enter EM2
+        EMU_EnterEM2(true);
+    } else if (sleep_block_counter[3] > 0) {
+        // Blocked everything below EM3, enter EM3
+        EMU_EnterEM3(true);
+    }
     return;
 }
 
@@ -74,11 +74,11 @@
  * After the peripheral is finished with the operation, it should call unblock with the same state
  *
  */
-void blockSleepMode(sleepstate_enum minimumMode) 
+void blockSleepMode(sleepstate_enum minimumMode)
 {
-	INT_Disable();
-	sleep_block_counter[minimumMode]++;
-	INT_Enable();
+    INT_Disable();
+    sleep_block_counter[minimumMode]++;
+    INT_Enable();
 }
 
 /** Unblock the microcontroller from sleeping below a certain mode
@@ -88,14 +88,13 @@
  *
  * This should be called after all transactions on a peripheral are done.
  */
-void unblockSleepMode(sleepstate_enum minimumMode) 
+void unblockSleepMode(sleepstate_enum minimumMode)
 {
-	INT_Disable();
-	if(sleep_block_counter[minimumMode] > 0) 
-	{
-		sleep_block_counter[minimumMode]--;
-	}
-	INT_Enable();
+    INT_Disable();
+    if(sleep_block_counter[minimumMode] > 0) {
+        sleep_block_counter[minimumMode]--;
+    }
+    INT_Enable();
 }
 
 #endif