Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_api.c
- Revision:
- 113:65a335a675de
- Parent:
- 20:4263a77256ae
- Child:
- 227:7bd0639b8911
diff -r a7168c414ef2 -r 65a335a675de targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_api.c --- a/targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_api.c Fri Mar 07 16:00:07 2014 +0000 +++ b/targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_api.c Mon Mar 10 11:30:07 2014 +0000 @@ -26,7 +26,7 @@ return 1 << ((uint32_t) pin & 0xF); } -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; @@ -39,14 +39,6 @@ obj->reg_set = &port_reg->BSRRL; obj->reg_clr = &port_reg->BSRRH; obj->reg_in = &port_reg->IDR; - - - gpio_dir(obj, direction); - - switch (direction) { - case PIN_OUTPUT: pin_mode(pin, PullNone); break; - case PIN_INPUT : pin_mode(pin, PullDown); break; - } } void gpio_mode(gpio_t *obj, PinMode mode) {