mbed library sources

Fork of mbed-src by mbed official

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);
     }
 }