summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/stm32/stm32_uart.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-20 13:34:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-20 13:34:04 +0000
commit0f775d5711a3b6cf2815ab3cbd9da580a587d2df (patch)
treec62d1f217a6c2f17049bd6344b201c35e6bee707 /nuttx/arch/arm/src/stm32/stm32_uart.h
parent5035b7378f06c3187cac0308fa8c5a76e2b5baef (diff)
downloadpx4-nuttx-0f775d5711a3b6cf2815ab3cbd9da580a587d2df.tar.gz
px4-nuttx-0f775d5711a3b6cf2815ab3cbd9da580a587d2df.tar.bz2
px4-nuttx-0f775d5711a3b6cf2815ab3cbd9da580a587d2df.zip
0001-RS-485-support-for-STM32-serial-driver.patch from Freddi Chopin
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5371 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_uart.h')
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_uart.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_uart.h b/nuttx/arch/arm/src/stm32/stm32_uart.h
index a70923cbf..8ff6a9975 100644
--- a/nuttx/arch/arm/src/stm32/stm32_uart.h
+++ b/nuttx/arch/arm/src/stm32/stm32_uart.h
@@ -223,6 +223,20 @@
# undef SERIAL_HAVE_ONLY_DMA
#endif
+/* Is RS-485 used? */
+
+#if defined(CONFIG_USART1_RS485) || defined(CONFIG_USART2_RS485) || \
+ defined(CONFIG_USART3_RS485) || defined(CONFIG_UART4_RS485) || \
+ defined(CONFIG_UART5_RS485) || defined(CONFIG_USART6_RS485)
+# define HAVE_RS485 1
+#endif
+
+#ifdef HAVE_RS485
+# define USART_CR1_USED_INTS (USART_CR1_RXNEIE | USART_CR1_TXEIE | USART_CR1_PEIE | USART_CR1_TCIE)
+#else
+# define USART_CR1_USED_INTS (USART_CR1_RXNEIE | USART_CR1_TXEIE | USART_CR1_PEIE)
+#endif
+
/************************************************************************************
* Public Types
************************************************************************************/