Skip to content

Commit ebfe44c

Browse files
authored
Merge pull request #2038 from infinnovation/parityeven-fix
[K64F] serial_api.c: Fix #1979 assertion error for ParityEven
2 parents a3a4c78 + 9455e89 commit ebfe44c

File tree

1 file changed

+2
-0
lines changed
  • hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K64F

1 file changed

+2
-0
lines changed

hal/targets/hal/TARGET_Freescale/TARGET_KSDK2_MCUS/TARGET_K64F/serial_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
9898
temp |= (UART_C1_PE_MASK | UART_C1_M_MASK);
9999
if (parity == ParityOdd) {
100100
temp |= UART_C1_PT_MASK;
101+
} else if (parity == ParityEven) {
102+
// PT=0 so nothing more to do
101103
} else {
102104
// Hardware does not support forced parity
103105
MBED_ASSERT(0);

0 commit comments

Comments
 (0)