aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/f4/usart.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3/stm32/f4/usart.h')
-rw-r--r--include/libopencm3/stm32/f4/usart.h63
1 files changed, 20 insertions, 43 deletions
diff --git a/include/libopencm3/stm32/f4/usart.h b/include/libopencm3/stm32/f4/usart.h
index ac113da..461db50 100644
--- a/include/libopencm3/stm32/f4/usart.h
+++ b/include/libopencm3/stm32/f4/usart.h
@@ -1,9 +1,21 @@
+/** @defgroup usart_defines USART Defines
+
+@brief <b>Defined Constants and Types for the STM32F4xx USART</b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2012 Ken Sarkies <ksarkies@internode.on.net>
+
+@date 5 December 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
- * Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
- *
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@@ -18,46 +30,11 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBOPENCM3_USART_F4_H
-#define LIBOPENCM3_USART_F4_H
-
-#include <libopencm3/stm32/usart.h>
-
-/* --- Convenience macros -------------------------------------------------- */
-
-#define USART6 USART6_BASE
+#ifndef LIBOPENCM3_USART_H
+#define LIBOPENCM3_USART_H
-/* --- USART registers ----------------------------------------------------- */
-
-/* Status register (USARTx_SR) */
-#define USART6_SR USART_SR(USART6_BASE)
-
-/* Data register (USARTx_DR) */
-#define USART6_DR USART_DR(USART6_BASE)
-
-/* Baud rate register (USARTx_BRR) */
-#define USART6_BRR USART_BRR(USART6_BASE)
-
-/* Control register 1 (USARTx_CR1) */
-#define USART6_CR1 USART_CR1(USART6_BASE)
-
-/* Control register 2 (USARTx_CR2) */
-#define USART6_CR2 USART_CR2(USART6_BASE)
-
-/* Control register 3 (USARTx_CR3) */
-#define USART6_CR3 USART_CR3(USART6_BASE)
-
-/* Guard time and prescaler register (USARTx_GTPR) */
-#define USART6_GTPR USART_GTPR(USART6_BASE)
-
-/* --- USART_CR1 values ---------------------------------------------------- */
-
-/* OVER8: Oversampling mode */
-#define USART_CR1_OVER8 (1 << 15)
-
-/* --- USART_CR3 values ---------------------------------------------------- */
-
-/* ONEBIT: One sample bit method enable */
-#define USART_CR3_ONEBIT (1 << 11)
+#include <libopencm3/stm32/f4/memorymap.h>
+#include <libopencm3/stm32/common/usart_common_f24.h>
#endif
+