drivers: uart: add support for collision detection error
Certain uarts support collision detection. This is mainly used in half-duplex scenarios, like RS-485 and raises an error when bits output on the TX line do not match the bits received on the RX line. Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
This commit is contained in:
parent
6d9c1ee292
commit
bc839c8707
1 changed files with 10 additions and 0 deletions
|
@ -167,6 +167,16 @@ enum uart_rx_stop_reason {
|
||||||
* start time + data bits + parity + stop bits.
|
* start time + data bits + parity + stop bits.
|
||||||
*/
|
*/
|
||||||
UART_BREAK = (1 << 3),
|
UART_BREAK = (1 << 3),
|
||||||
|
/**
|
||||||
|
* @brief Collision error
|
||||||
|
*
|
||||||
|
* This error is raised when transmitted data does not match
|
||||||
|
* received data. Typically this is useful in scenarios where
|
||||||
|
* the TX and RX lines maybe connected together such as
|
||||||
|
* RS-485 half-duplex. This error is only valid on UARTs that
|
||||||
|
* support collision checking.
|
||||||
|
*/
|
||||||
|
UART_ERROR_COLLISION = (1 << 4),
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief UART TX event data. */
|
/** @brief UART TX event data. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue