The core functions for using an RTOS UART tx driver instance after it has been initialized and started.
◆ rtos_uart_tx_init()
void rtos_uart_tx_init |
( |
rtos_uart_tx_t * |
ctx, |
|
|
const port_t |
tx_port, |
|
|
const uint32_t |
baud_rate, |
|
|
const uint8_t |
num_data_bits, |
|
|
const uart_parity_t |
parity, |
|
|
const uint8_t |
stop_bits, |
|
|
hwtimer_t |
tmr |
|
) |
| |
Initialises an RTOS UART tx driver instance. This must only be called by the tile that owns the driver instance. It may be called either before or after starting the RTOS, but must be called before calling rtos_uart_tx_start() or any of the core UART tx driver functions with this instance.
- Parameters
-
ctx | A pointer to the UART tx driver instance to initialise. |
tx_port | The port containing the transmit pin |
baud_rate | The baud rate of the UART in bits per second. |
data_bits | The number of data bits per frame sent. |
parity | The type of parity used. See uart_parity_t above. |
stop_bits | The number of stop bits asserted at the of the frame. |
tmr | The resource id of the timer to be used by the UART tx. |
◆ rtos_uart_tx_start()
Starts an RTOS UART tx driver instance. This must only be called by the tile that owns the driver instance. It may be called either before or after starting the RTOS, but must be called before any of the core UART tx driver functions are called with this instance.
rtos_uart_tx_init() must be called on this UART tx driver instance prior to calling this.
- Parameters
-
rtos_uart_tx_t | A pointer to the UART tx driver instance to start. |
◆ rtos_uart_tx_write()
void rtos_uart_tx_write |
( |
rtos_uart_tx_t * |
ctx, |
|
|
const uint8_t |
buf[], |
|
|
size_t |
n |
|
) |
| |
|
inline |
Writes data to an UART instance.
- Parameters
-
ctx | A pointer to the UART Tx driver instance to use. |
buf | The buffer containing data to write. |
n | The number of bytes to write. |