diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-07-20 16:58:39 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-07-20 16:58:39 +0000 |
commit | 3dd3e950cbb7e7050b3d1743ef651513a6c61bcf (patch) | |
tree | 1f721949aec6fcb3c70430b5990daadf4f26751d /nuttx/include | |
parent | bfeaf56050b65d0a6887049ab42cfd20c04c6ca2 (diff) | |
download | px4-firmware-3dd3e950cbb7e7050b3d1743ef651513a6c61bcf.tar.gz px4-firmware-3dd3e950cbb7e7050b3d1743ef651513a6c61bcf.tar.bz2 px4-firmware-3dd3e950cbb7e7050b3d1743ef651513a6c61bcf.zip |
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.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/nuttx/include/nuttx/serial/tioctl.h b/nuttx/include/nuttx/serial/tioctl.h index a3ce2c7d3..a923fa324 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 ********************************************************************************************/ |