From 9531d653fb83bd9864a882a190f286a92499ca72 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 11 Jun 2012 12:45:58 +0000 Subject: Even/Odd parity bit configs used the wrong bit Checked F10x, F100, F4 and L1 reference manuals. Confirmed with my user application code. --- include/libopencm3/stm32/usart.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/libopencm3') diff --git a/include/libopencm3/stm32/usart.h b/include/libopencm3/stm32/usart.h index d9f2c8d..5c7f285 100644 --- a/include/libopencm3/stm32/usart.h +++ b/include/libopencm3/stm32/usart.h @@ -270,8 +270,8 @@ /* CR1_PCE / CR1_PS combined values */ #define USART_PARITY_NONE 0x00 -#define USART_PARITY_ODD USART_CR1_PS -#define USART_PARITY_EVEN (USART_CR1_PS | USART_CR1_PCE) +#define USART_PARITY_EVEN USART_CR1_PCE +#define USART_PARITY_ODD (USART_CR1_PS | USART_CR1_PCE) #define USART_PARITY_MASK (USART_CR1_PS | USART_CR1_PCE) /* CR1_TE/CR1_RE combined values */ -- cgit v1.2.3