mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c
- Revision:
- 242:7074e42da0b2
- Parent:
- 239:8cadf13dff33
- Child:
- 293:2a9cf2ed1474
diff -r ffe41b0c8126 -r 7074e42da0b2 targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c --- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c Thu Jun 26 10:30:09 2014 +0100 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/serial_api.c Fri Jun 27 07:30:09 2014 +0100 @@ -181,10 +181,10 @@ } void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits) { - if (data_bits == 8) { + if (data_bits == 9) { + obj->databits = UART_WORDLENGTH_9B; + } else { obj->databits = UART_WORDLENGTH_8B; - } else { - obj->databits = UART_WORDLENGTH_9B; } switch (parity) {