From 0b84caa13eb9b5c131acb78187b582c3e2ed703f Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 24 Oct 2017 23:54:22 +0000 Subject: [PATCH] stm32: usart: Move f3 TDR/RDR definitions to -v2 Data registers are standard. --- include/libopencm3/stm32/common/usart_common_v2.h | 11 +++++++++++ include/libopencm3/stm32/f3/usart.h | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/libopencm3/stm32/common/usart_common_v2.h b/include/libopencm3/stm32/common/usart_common_v2.h index 4b5bee60..113126dd 100644 --- a/include/libopencm3/stm32/common/usart_common_v2.h +++ b/include/libopencm3/stm32/common/usart_common_v2.h @@ -557,6 +557,17 @@ /**@}*/ +/** @defgroup usart_dr_values USART_RDR/TDR Values + * @ingroup usart_defines + * @{ + */ +/** RDR[8:0]: Receive data value */ +#define USART_RDR_MASK (0x1FF << 0) +/** TDR[8:0]: Transmit data value */ +#define USART_TDR_MASK (0x1FF << 0) +/**@}*/ + + /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS diff --git a/include/libopencm3/stm32/f3/usart.h b/include/libopencm3/stm32/f3/usart.h index ce4af10f..f2de8f0f 100644 --- a/include/libopencm3/stm32/f3/usart.h +++ b/include/libopencm3/stm32/f3/usart.h @@ -80,15 +80,6 @@ -/* --- USART_RDR values --------------------------------------------------- */ - -/* RDR[8:0]: Receive data value */ -#define USART_RDR_MASK (0x1FF << 0) - -/* --- USART_TDR values --------------------------------------------------- */ - -/* TDR[8:0]: Transmit data value */ -#define USART_TDR_MASK (0x1FF << 0) #endif