![]() |
Dataflow Runtime API
3.0.3.0
|
Functions | |
| void | UART_Init (const UartModuleAddress uartModule, const UartBaudRate baudRate, const UartDataBits dataBits, const UartStopBits stopBits, const UartParity parity, const UartFlowControl flowControl, const uint8_t xOnCharacter=0x11, const uint8_t xOffCharacter=0x13) |
| Initializes the UART module according to the specified parameters. More... | |
| void | UART_EnableReceivingInterrupt (const UartModuleAddress uartModule, const bool enable) |
| Enable the interrupt when a byte is received. More... | |
| bool | UART_HasDataToRead (const UartModuleAddress uartModule) |
| Check if data is ready to be read from the receiver holding register. More... | |
| uint8_t | UART_ReadByte (const UartModuleAddress uartModule) |
| Read the content of the receiver holding register. More... | |
| void | UART_WriteByte (const UartModuleAddress uartModule, const uint8_t data) |
| Write the data to the the transmit holding register. More... | |
| bool | UART_IsTxFifoFull (const UartModuleAddress uartModule) |
| Check if the TX FIFO is full. More... | |
| bool | UART_IsClearToSend (const UartModuleAddress uartModule) |
| Check if the CTS is active (receiver is ready for receive). More... | |
| enum UartBaudRate |
Id's of the supported UART baud rates.
| enum UartDataBits |
| enum UartFlowControl |
| enum UartModuleAddress |
Universal Asynchronous Receiver/Transmitter (UART) peripheral module.
The UART interface contains 6 instantiations of the UART/IrDA (UARTIRDAOCP) peripheral. There are six UART modules called UART0 – UART5. see SystemMemoryMap.h (SOC_UART_0_REGS - SOC_UART_5_REGS) Enumeration of the available UART modules
| Enumerator | |
|---|---|
| UartModuleAddress_UART0 | |
| UartModuleAddress_UART1 | |
| UartModuleAddress_UART2 | |
| UartModuleAddress_UART3 | |
| UartModuleAddress_UART4 | |
| UartModuleAddress_UART5 | |
| enum UartParity |
| enum UartStopBits |
| void UART_EnableReceivingInterrupt | ( | const UartModuleAddress | uartModule, |
| const bool | enable | ||
| ) |
Enable the interrupt when a byte is received.
| uartModule | the desired UART module |
| enable |
| bool UART_HasDataToRead | ( | const UartModuleAddress | uartModule | ) |
Check if data is ready to be read from the receiver holding register.
| uartModule | the desired UART module |
| void UART_Init | ( | const UartModuleAddress | uartModule, |
| const UartBaudRate | baudRate, | ||
| const UartDataBits | dataBits, | ||
| const UartStopBits | stopBits, | ||
| const UartParity | parity, | ||
| const UartFlowControl | flowControl, | ||
| const uint8_t | xOnCharacter = 0x11, |
||
| const uint8_t | xOffCharacter = 0x13 |
||
| ) |
Initializes the UART module according to the specified parameters.
| uartModule | The UART module to configure |
| baudRate | The baud rate to use |
| dataBits | The data bits type to use |
| stopBits | The stop bits type to use |
| parity | The parity to use |
| flowControl | The flow control to use |
| xOnCharacter | The XON character to use for software flow control (Default is 0x11 = DC1 / XON) |
| xOffCharacter | The XOFF character to use for software flow control (Default is 0x13 = DC3 / XOFF) |
| bool UART_IsClearToSend | ( | const UartModuleAddress | uartModule | ) |
Check if the CTS is active (receiver is ready for receive).
| uartModule | the desired UART module |
| bool UART_IsTxFifoFull | ( | const UartModuleAddress | uartModule | ) |
Check if the TX FIFO is full.
| uartModule | the desired UART module |
| uint8_t UART_ReadByte | ( | const UartModuleAddress | uartModule | ) |
Read the content of the receiver holding register.
| uartModule | the desired UART module |
| void UART_WriteByte | ( | const UartModuleAddress | uartModule, |
| const uint8_t | data | ||
| ) |
Write the data to the the transmit holding register.
Call this method only if the TX FIFO is not full (check with UART_IsTxFifoFull).
| uartModule | the desired UART module |
| data |