mbed library sources

Fork of mbed-src by mbed official

Revision:
127:ce7cebc0511f
Parent:
113:65a335a675de
Child:
160:6870f452afa4
--- a/common/gpio.c	Wed Mar 19 16:00:09 2014 +0000
+++ b/common/gpio.c	Wed Mar 19 17:15:21 2014 +0000
@@ -17,9 +17,9 @@
 
 static inline void _gpio_init_in(gpio_t* gpio, PinName pin, PinMode mode)
 {
-    gpio_init(gpio, pin);
+    gpio_init(gpio, pin);    
+    gpio_dir(gpio, PIN_INPUT);
     gpio_mode(gpio, mode);
-    gpio_dir(gpio, PIN_INPUT);
 }
     
 static inline void _gpio_init_out(gpio_t* gpio, PinName pin, PinMode mode, int value)