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:
556:a217bc785985
Parent:
548:1abac31e188e
Child:
593:78ee8643776a
--- a/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c	Wed Jun 03 08:00:08 2015 +0100
+++ b/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c	Wed Jun 03 08:30:08 2015 +0100
@@ -42,8 +42,6 @@
     CMU_ClockEnable(cmuClock_HFPER, true);
     CMU_ClockEnable(cmuClock_GPIO, true);
     obj->pin = pin;
-    obj->mask = gpio_set(pin);
-    obj->port = pin >> 4;
 }
 
 void gpio_pin_enable(gpio_t *obj, uint8_t enable)
@@ -63,7 +61,7 @@
     //Handle pullup for input
     if(mode == InputPullUp) {
         //Set DOUT
-        GPIO->P[obj->port & 0xF].DOUTSET = 1 << (obj->pin & 0xF);
+        GPIO->P[(obj->pin >> 4) & 0xF].DOUTSET = 1 << (obj->pin & 0xF);
     }
 }