- 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_NUCLEO_F030R8/port_api.c
- Revision:
- 332:e299ae530e63
- Parent:
- 285:31249416b6f9
diff -r 098575c6d2c8 -r e299ae530e63 targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c --- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c Wed Sep 24 13:15:06 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c Sat Sep 27 11:16:28 2014 +0000 @@ -88,11 +88,7 @@ } int port_read(port_t *obj) { - if (obj->direction == PIN_OUTPUT) { - return (*obj->reg_out & obj->mask); - } else { // PIN_INPUT - return (*obj->reg_in & obj->mask); - } + return (*obj->reg_in & obj->mask); // always read IDR, regardless of pin direction } #endif