summaryrefslogtreecommitdiffstats
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-20 16:58:39 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-07-20 16:58:39 +0000
commit528290eda337a02b7a20284c820b445b662590e4 (patch)
tree1f721949aec6fcb3c70430b5990daadf4f26751d /nuttx/include
parent263da58bac65c767a919ab858e0fcfa5ba8fe6b5 (diff)
Add infrastructure to support RS-485 on the LPC43xx (logic still incomplete)
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4958 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/serial/tioctl.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/nuttx/include/nuttx/serial/tioctl.h b/nuttx/include/nuttx/serial/tioctl.h
index a3ce2c7d3a..a923fa324a 100644
--- a/nuttx/include/nuttx/serial/tioctl.h
+++ b/nuttx/include/nuttx/serial/tioctl.h
@@ -160,9 +160,21 @@
#define TIOCMIWAIT _TIOC(0x0028) /* Wait for a change on serial input line(s): void */
#define TIOCGICOUNT _TIOC(0x0029) /* Read serial port interrupt count: FAR struct serial_icounter_struct */
+/* RS-485 Support */
+
+#define TIOCSRS485 _TIOC(0x002a) /* Set RS485 mode, arg: pointer to struct serial_rs485 */
+#define TIOCGRS485 _TIOC(0x002b) /* Get RS485 mode, arg: pointer to struct serial_rs485 */
+
/* Debugging */
-#define TIOCSERGSTRUCT _TIOC(0x002a) /* Get device TTY structure */
+#define TIOCSERGSTRUCT _TIOC(0x002c) /* Get device TTY structure */
+
+/* Definitions used in struct serial_rs485 (Linux compatible) */
+
+#define SER_RS485_ENABLED (1 << 0) /* Enable/disble RS-485 support */
+#define SER_RS485_RTS_ON_SEND (1 << 1) /* Logic level for RTS pin when sending */
+#define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logic level for RTS pin after sent */
+#define SER_RS485_RX_DURING_TX (1 << 4)
/********************************************************************************************
* Public Type Definitions
@@ -178,6 +190,15 @@ struct winsize
/* uint16_t ws_ypixel; unused */
};
+/* Structure used with TIOCSRS485 and TIOCGRS485 (Linux compatible) */
+
+struct serial_rs485
+{
+ uint32_t flags /* See SER_RS485_* definitions */
+ uint32_t delay_rts_before_send; /* Delay before send (milliseconds) */
+ uint32_t delay_rts_after_send; /* Delay after send (milliseconds) */
+};
+
/********************************************************************************************
* Public Function Prototypes
********************************************************************************************/