diff options
Diffstat (limited to 'Documentation/serial/serial-rs485.txt')
-rw-r--r-- | Documentation/serial/serial-rs485.txt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt index 079cb3df62cf..41c8378c0b2f 100644 --- a/Documentation/serial/serial-rs485.txt +++ b/Documentation/serial/serial-rs485.txt | |||
@@ -97,15 +97,23 @@ | |||
97 | 97 | ||
98 | struct serial_rs485 rs485conf; | 98 | struct serial_rs485 rs485conf; |
99 | 99 | ||
100 | /* Set RS485 mode: */ | 100 | /* Enable RS485 mode: */ |
101 | rs485conf.flags |= SER_RS485_ENABLED; | 101 | rs485conf.flags |= SER_RS485_ENABLED; |
102 | 102 | ||
103 | /* Set logical level for RTS pin equal to 1 when sending: */ | ||
104 | rs485conf.flags |= SER_RS485_RTS_ON_SEND; | ||
105 | /* or, set logical level for RTS pin equal to 0 when sending: */ | ||
106 | rs485conf.flags &= ~(SER_RS485_RTS_ON_SEND); | ||
107 | |||
108 | /* Set logical level for RTS pin equal to 1 after sending: */ | ||
109 | rs485conf.flags |= SER_RS485_RTS_AFTER_SEND; | ||
110 | /* or, set logical level for RTS pin equal to 0 after sending: */ | ||
111 | rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND); | ||
112 | |||
103 | /* Set rts delay before send, if needed: */ | 113 | /* Set rts delay before send, if needed: */ |
104 | rs485conf.flags |= SER_RS485_RTS_BEFORE_SEND; | ||
105 | rs485conf.delay_rts_before_send = ...; | 114 | rs485conf.delay_rts_before_send = ...; |
106 | 115 | ||
107 | /* Set rts delay after send, if needed: */ | 116 | /* Set rts delay after send, if needed: */ |
108 | rs485conf.flags |= SER_RS485_RTS_AFTER_SEND; | ||
109 | rs485conf.delay_rts_after_send = ...; | 117 | rs485conf.delay_rts_after_send = ...; |
110 | 118 | ||
111 | /* Set this flag if you want to receive data even whilst sending data */ | 119 | /* Set this flag if you want to receive data even whilst sending data */ |