From ecd6d5246318c4d61e19f62c77073d0185ebce1c Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 24 Jul 2009 02:19:06 +0200 Subject: Add RCC_CR2 bit definitions. --- include/libopenstm32/usart.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/libopenstm32/usart.h') diff --git a/include/libopenstm32/usart.h b/include/libopenstm32/usart.h index 5346326..ddd0131 100644 --- a/include/libopenstm32/usart.h +++ b/include/libopenstm32/usart.h @@ -120,7 +120,21 @@ /* --- RCC_CR2 values ------------------------------------------------------ */ -/* TODO */ +#define CR2_LINEN (1 << 14) /* LIN mode enable */ +/* CR2[13:12]: STOP */ +#define CR2_CLKEN (1 << 11) /* Clock enable */ +#define CR2_CPOL (1 << 10) /* Clock polarity */ +#define CR2_CPHA (1 << 9) /* Clock phase */ +#define CR2_LBCL (1 << 8) /* Last bit clock pulse */ +#define CR2_LBDIE (1 << 6) /* LIN break detection interrupt enable */ +#define CR2_LBDL (1 << 5) /* lin break detection length */ +/* CR2[3:0]: ADD */ + +#define CR2_STOPBITS_1 0x00 +#define CR2_STOPBITS_0_5 0x01 +#define CR2_STOPBITS_2 0x02 +#define CR2_STOPBITS_1_5 0x03 + /* --- RCC_CR3 values ------------------------------------------------------ */ -- cgit v1.2.3