mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c
- Revision:
- 113:65a335a675de
- Parent:
- 87:085cde657901
- Child:
- 172:2f4f8c56b261
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c Fri Mar 07 16:00:07 2014 +0000 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c Mon Mar 10 11:30:07 2014 +0000 @@ -42,7 +42,7 @@ return (uint32_t)(1 << ((uint32_t)pin & 0xF)); // Return the pin mask } -void gpio_init(gpio_t *obj, PinName pin, PinDirection direction) { +void gpio_init(gpio_t *obj, PinName pin) { if (pin == NC) return; uint32_t port_index = STM_PORT(pin); @@ -57,14 +57,6 @@ obj->reg_in = &gpio->IDR; obj->reg_set = &gpio->BSRRL; obj->reg_clr = &gpio->BSRRH; - - // Configure GPIO - if (direction == PIN_OUTPUT) { - pin_function(pin, STM_PIN_DATA(STM_MODE_OUTPUT_PP, GPIO_NOPULL, 0)); - } - else { // PIN_INPUT - pin_function(pin, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)); - } } void gpio_mode(gpio_t *obj, PinMode mode) {