Interface for UART specific functionalities, which are not solved in a generic way in CommunicationHardware
.
More...
#include <uart.h>
|
enum class | FlowControl : uint8_t { NoFlowControl = 0x00
, RtsFlowControl = 0x01
, CtsFlowControl = 0x10
, RtsAndCtsFlowControl = 0x11
} |
|
enum class | Parity : uint8_t { NoParity
, OddParity
, EvenParity
} |
|
enum class | StopBits : uint8_t { Stopbits_0_5
, Stopbits_1
, Stopbits_1_5
, Stopbits_2
} |
|
enum class | WireMode : uint8_t { ReadWire
, WriteWire
, ReadAndWriteWires
} |
|
Interface for UART specific functionalities, which are not solved in a generic way in CommunicationHardware
.
- See also
CommunicationHardware
-
UartHardware
Definition at line 24 of file uart.h.
◆ FlowControl
Flow control modes for using RTS / CTS.
Enumerator |
---|
NoFlowControl | No flow control setting, only RXD and TXD pins are used.
|
RtsFlowControl | Receive flow control setting, RXD, TXD and RTS pins are used.
|
CtsFlowControl | Transmit flow control setting, RXD, TXD and CTS pins are used.
|
RtsAndCtsFlowControl | Full flow control setting, RXD, TXD, CTS and RTS pins are used.
|
Definition at line 28 of file uart.h.
◆ Parity
Parity setting.
Enumerator |
---|
NoParity | |
OddParity | |
EvenParity | |
Definition at line 36 of file uart.h.
◆ StopBits
Number of stop bits.
Enumerator |
---|
Stopbits_0_5 | |
Stopbits_1 | |
Stopbits_1_5 | |
Stopbits_2 | |
Definition at line 43 of file uart.h.
◆ WireMode
Wire mode for full- or half duplex mode.
Enumerator |
---|
ReadWire | |
WriteWire | |
ReadAndWriteWires | |
Definition at line 51 of file uart.h.
◆ ~Uart()
virtual semf::Uart::~Uart |
( |
| ) |
|
|
virtualdefault |
◆ baud()
virtual uint32_t semf::Uart::baud |
( |
| ) |
|
|
pure virtual |
Returns the currently used baud rate.
- Returns
- Baud rate.
Implemented in semf::Stm32Uart.
◆ setBaud()
virtual void semf::Uart::setBaud |
( |
uint32_t |
baud | ) |
|
|
pure virtual |
◆ setFormat()
Sets the format for the spi slave device.
- Parameters
-
bits | Number of data bits (without parity) per frame. |
wire | Full duplex mode or half duplex mode. |
par | Parity. |
stop | Stop bits. |
flow | Flow control. |
- Note
- Number of data bits differs that the number of bits to be send. i.e.: in case of sending a frame 8 bits without parity, number of data bits should be 8 bits. i.e.: in case of sending a frame of 8 bits including a parity, number of bits should be 7 bits.
Implemented in semf::Stm32Uart.