mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c
- Revision:
- 207:05668db47a72
- Parent:
- 174:8bb9f3a33240
- Child:
- 227:7bd0639b8911
diff -r 00f6ed987803 -r 05668db47a72 targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c --- a/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c Fri May 23 05:45:06 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_api.c Fri May 23 08:45:06 2014 +0100 @@ -26,10 +26,15 @@ } uint32_t gpio_set(PinName pin) { - if (!gpio_enabled) gpio_enable(); + int f = ((pin == P0_0) || + (pin == P0_10) || + (pin == P0_15)) ? (1) : (0); + + pin_function(pin, f); + return (1UL << ((int)pin >> PIN_SHIFT & 0x1F)); }