- fix F411 F334 systeminit when HSI used - portinout always read IDR regardless of port direction
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c
- Revision:
- 242:7074e42da0b2
- Parent:
- 133:d4dda5c437f0
- Child:
- 250:a49055e7a707
--- a/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c Thu Jun 26 10:30:09 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c Fri Jun 27 07:30:09 2014 +0100 @@ -31,7 +31,6 @@ #include "pinmap.h" #include "gpio_api.h" #include "error.h" -#include "stm32f4xx_hal.h" #if DEVICE_PORTIN || DEVICE_PORTOUT @@ -67,8 +66,7 @@ if (obj->mask & (1 << i)) { // If the pin is used if (dir == PIN_OUTPUT) { pin_function(port_pin(obj->port, i), STM_PIN_DATA(STM_MODE_OUTPUT_PP, GPIO_NOPULL, 0)); - } - else { // PIN_INPUT + } else { // PIN_INPUT pin_function(port_pin(obj->port, i), STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)); } } @@ -91,8 +89,7 @@ int port_read(port_t *obj) { if (obj->direction == PIN_OUTPUT) { return (*obj->reg_out & obj->mask); - } - else { // PIN_INPUT + } else { // PIN_INPUT return (*obj->reg_in & obj->mask); } }