Menu

#38 RS485 Support

closed
None
5
2015-08-06
2014-09-04
No

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 /

define SER_RS485_ENABLED (1 << 0) / If enabled /

define SER_RS485_RTS_ON_SEND (1 << 1) /* Logical level for

                                                       RTS pin when
                                                       sending */

define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for

                                                       RTS pin after sent*/

define SER_RS485_RX_DURING_TX (1 << 4)

    __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 .. */

};

Discussion

  • Chris Liechti

    Chris Liechti - 2015-08-06
    • status: open --> accepted
    • assigned_to: Chris Liechti
     
  • Chris Liechti

    Chris Liechti - 2015-08-06
    • status: accepted --> closed
     

Log in to post a comment.