mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c
- Revision:
- 113:65a335a675de
- Parent:
- 84:f54042cbc282
- Child:
- 216:577900467c9e
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c Fri Mar 07 16:00:07 2014 +0000 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c Mon Mar 10 11:30:07 2014 +0000 @@ -41,7 +41,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); @@ -56,14 +56,6 @@ obj->reg_in = &gpio->IDR; obj->reg_set = &gpio->BSRR; obj->reg_clr = &gpio->BRR; - - // Configure GPIO - if (direction == PIN_OUTPUT) { - pin_function(pin, STM_PIN_DATA(GPIO_Mode_OUT, GPIO_OType_PP, GPIO_PuPd_NOPULL, 0xFF)); - } - else { // PIN_INPUT - pin_function(pin, STM_PIN_DATA(GPIO_Mode_IN, 0, GPIO_PuPd_NOPULL, 0xFF)); - } } void gpio_mode(gpio_t *obj, PinMode mode) {