UART¶
- class brainstem.entity.UART(module, index)[source]¶
UART Class: A UART is a “Universal Asynchronous Receiver/Transmitter. Many times referred to as a COM (communication), Serial, or TTY (teletypewriter) port.
The UART Class allows the enabling and disabling of the UART data lines.
- getBaudRate()[source]¶
Get the UART baud rate. Pointer variable to be filled with baud rate.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getEnable()[source]¶
Get the enabled state of the uart. true: enabled, false: disabled.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getProtocol()[source]¶
Get the UART protocol. Pointer to where result is placed.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- setBaudRate(rate)[source]¶
Set the UART baud rate.
- Parameters:
rate (const unsigned int) – baud rate.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte