aboutsummaryrefslogtreecommitdiff
path: root/include/libopenstm32
diff options
context:
space:
mode:
authorUwe Hermann2009-07-24 02:19:06 +0200
committerUwe Hermann2009-07-24 14:43:43 +0200
commitecd6d5246318c4d61e19f62c77073d0185ebce1c (patch)
tree4f8d4aa12f0e5bef117c8d4a64dbb771296daf8e /include/libopenstm32
parent944456fde184454714fa45a60c4c3d9a020e5d67 (diff)
Add RCC_CR2 bit definitions.
Diffstat (limited to 'include/libopenstm32')
-rw-r--r--include/libopenstm32/usart.h16
1 files changed, 15 insertions, 1 deletions
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 ------------------------------------------------------ */