From 372819411b585e5be2c67026b0d8fb2df01ed61f Mon Sep 17 00:00:00 2001 From: Antoine van Gelder Date: Fri, 13 Dec 2024 13:18:27 +0200 Subject: [PATCH] firmware.uart: fix incorrect field values for uart lcr register --- firmware/include/drivers/uart.h | 6 +++--- firmware/platform/lpc43xx/include/drivers/platform_uart.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/firmware/include/drivers/uart.h b/firmware/include/drivers/uart.h index 8727bc7..5bca105 100644 --- a/firmware/include/drivers/uart.h +++ b/firmware/include/drivers/uart.h @@ -22,9 +22,9 @@ typedef enum { typedef enum { NO_PARITY = 0b000, - ODD_PARITY = 0b100, - EVEN_PARITY = 0b101, - PARITY_STUCK_AT_ONE = 0b110, + ODD_PARITY = 0b001, + EVEN_PARITY = 0b011, + PARITY_STUCK_AT_ONE = 0b101, PARITY_STUCK_AT_ZERO = 0b111, } uart_parity_type_t; diff --git a/firmware/platform/lpc43xx/include/drivers/platform_uart.h b/firmware/platform/lpc43xx/include/drivers/platform_uart.h index 27a2faf..1b42af1 100644 --- a/firmware/platform/lpc43xx/include/drivers/platform_uart.h +++ b/firmware/platform/lpc43xx/include/drivers/platform_uart.h @@ -94,6 +94,7 @@ typedef volatile struct ATTR_PACKED { uint32_t parity_mode : 3; uint32_t use_break : 1; uint32_t divior_latch_access_enabled : 1; + uint32_t : 24; }; uint32_t line_control_register; };