summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-12-27 18:58:18 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-12-27 18:58:18 -0600
commitbd90f2ddfcb38af03ff369eccce76178ef42e0d0 (patch)
tree6f2b7711482b28be07fc682c462eabaebaa035f9 /nuttx/include
parent419a64187953a1302ac16bee0125637d8f9bef8a (diff)
downloadnuttx-bd90f2ddfcb38af03ff369eccce76178ef42e0d0.tar.gz
nuttx-bd90f2ddfcb38af03ff369eccce76178ef42e0d0.tar.bz2
nuttx-bd90f2ddfcb38af03ff369eccce76178ef42e0d0.zip
STM32 Serial: PX4 HW workarround for flaky STM32 RTS. From David Sidrane
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/serial/serial.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/serial/serial.h b/nuttx/include/nuttx/serial/serial.h
index 34eb1cc6d..710345511 100644
--- a/nuttx/include/nuttx/serial/serial.h
+++ b/nuttx/include/nuttx/serial/serial.h
@@ -1,7 +1,7 @@
/************************************************************************************
* include/nuttx/serial/serial.h
*
- * Copyright (C) 2007-2008, 2012-2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2008, 2012-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@
#include <nuttx/fs/fs.h>
/************************************************************************************
- * Definitions
+ * Pre-processor Definitions
************************************************************************************/
/* Maximum number of threads than can be waiting for POLL events */
@@ -62,6 +62,32 @@
# define CONFIG_SERIAL_NPOLLWAITERS 2
#endif
+/* RX flow control */
+
+#ifndef CONFIG_SERIAL_IFLOWCONTROL
+# undef CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS
+#endif
+
+#ifndef CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS
+# undef CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK
+# undef CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK
+#endif
+
+#ifdef CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS
+# ifndef CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK
+# define CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK 10
+# endif
+
+# ifndef CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK
+# define CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK 90
+# endif
+
+# if CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK > \
+ CONFIG_SERIAL_IFLOWCONTROL_UPPER_WATERMARK
+# warning Lower watermark pct exceeds upper watermark pct
+# endif
+#endif
+
/* vtable access helpers */
#define uart_setup(dev) dev->ops->setup(dev)