mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NORDIC/TARGET_NRF51822/gpio_api.c
- Revision:
- 113:65a335a675de
- Parent:
- 85:e1a8e879a6a9
- Child:
- 227:7bd0639b8911
--- a/targets/hal/TARGET_NORDIC/TARGET_NRF51822/gpio_api.c Fri Mar 07 16:00:07 2014 +0000 +++ b/targets/hal/TARGET_NORDIC/TARGET_NRF51822/gpio_api.c Mon Mar 10 11:30:07 2014 +0000 @@ -16,7 +16,7 @@ #include "gpio_api.h" #include "pinmap.h" -void gpio_init(gpio_t *obj, PinName pin, PinDirection direction) { +void gpio_init(gpio_t *obj, PinName pin) { if(pin == NC) return; obj->pin = pin; @@ -26,12 +26,6 @@ obj->reg_clr = &NRF_GPIO->OUTCLR; obj->reg_in = &NRF_GPIO->IN; obj->reg_dir = &NRF_GPIO->DIR; - - gpio_dir(obj, direction); - switch (direction) { - case PIN_OUTPUT: pin_mode(pin, PullNone); break; - case PIN_INPUT : pin_mode(pin, PullUp); break; - } } void gpio_mode(gpio_t *obj, PinMode mode) {