RS485 Support
Brought to you by:
cliechti
Linux provides special IOCTLs to activate transmitter control for RS485 half dulpex mode (via RTS pin): https://www.kernel.org/doc/Documentation/serial/serial-rs485.txt You can already use this facility on AT91 and OMAP SoCs. PySerial already provides rtsToggle option, but it needs to be extended to take more options, that serial_rs485 provides, like delays and other flags:
struct serial_rs485 {
__u32 flags; / RS485 feature flags /
RTS pin when sending */
RTS pin after sent*/
__u32 delay_rts_before_send; /* Delay before send (milliseconds) */ __u32 delay_rts_after_send; /* Delay after send (milliseconds) */ __u32 padding[5]; /* Memory is cheap, new structs are a royal PITA .. */
};
immplementation added to https://github.com/pyserial/pyserial
instead of the rts toggle property there is now a rs485 mode see https://github.com/pyserial/pyserial/blob/master/documentation/pyserial_api.rst#rs485-support