Struct rs485::SerialRs485 [] [src]

#[repr(C)]
pub struct SerialRs485 { /* fields omitted */ }

RS485 serial configuration

Internally, this structure is the same as a struct serial_rs485.

Methods

impl SerialRs485
[src]

Create a new, empty set of serial settings

All flags will default to "off", delays will be set to 0 ms.

Load settings from file descriptor

Settings will be loaded from the file descriptor, which must be a valid serial device support RS485 extensions

Enable RS485 support

Unless enabled, none of the settings set take effect.

Set RTS high or low before sending

RTS will be set before sending, this setting controls whether it will be set high (true) or low (false).

Set RTS high or low after sending

RTS will be set after sending, this setting contrls whether it will be set high (true) or low (false).

Delay before sending in ms

If set to non-zero, transmission will not start until delays_rts_before_send milliseconds after RTS has been set

Hold RTS after sending, in ms

If set to non-zero, RTS will be kept high/low for delays_rts_after_send ms after the transmission is complete

Allow receiving whilst transmitting

Note that turning off this option sometimes seems to make the UART misbehave and cut off transmission. For this reason, it is best left on even when using half-duplex.

Apply settings to file descriptor

Applies the constructed configuration a raw filedescriptor using ioctl.

Trait Implementations

impl Copy for SerialRs485
[src]

impl Clone for SerialRs485
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for SerialRs485
[src]

Formats the value using the given formatter.