UART

Files

file  uart.c
 Kubos-HAL-MSP430F5529 - UART module.
 

Functions

hal_uart_handle * uart_handle (KUARTNum uart)
 Helper function to get uart handle. More...
 
KUARTStatus kprv_uart_dev_init (KUARTNum uart)
 Creates and sets up specified UART device. More...
 
void kprv_uart_dev_terminate (KUARTNum uart)
 Terminates the specified UART device. More...
 
void kprv_uart_enable_tx_int (KUARTNum uart)
 Enables UART TX interrupt. More...
 
void hal_uart_interrupt (hal_uart_handle *handle)
 This function handles the rx/tx interrupts using FreeRTOS queues. More...
 
KUARTStatus k_uart_write_immediate (KUARTNum uart, char c)
 Write a character directly to the uart interface. More...
 
KUARTStatus k_uart_write_immediate_str (KUARTNum uart, uint8_t *ptr, uint8_t len)
 Write a string directly to the uart interface. More...
 

Function Documentation

void hal_uart_interrupt ( hal_uart_handle *  handle)

This function handles the rx/tx interrupts using FreeRTOS queues.

Parameters
handleUART handle
KUARTStatus k_uart_write_immediate ( KUARTNum  uart,
char  c 
)

Write a character directly to the uart interface.

Parameters
uartuart bus
ccharacter to write
Returns
KUARTStatus UART_OK if success, otherwise failure
KUARTStatus k_uart_write_immediate_str ( KUARTNum  uart,
uint8_t *  ptr,
uint8_t  len 
)

Write a string directly to the uart interface.

Parameters
uartuart bus
ptrbuffer to write data from
lenlength of data to write
Returns
KUARTStatus UART_OK if success, otherwise failure
KUARTStatus kprv_uart_dev_init ( KUARTNum  uart)

Creates and sets up specified UART device.

Parameters
uartNumber of UART device to setup.
Returns
KUARTStatus UART_OK on success, otherwise failure
void kprv_uart_dev_terminate ( KUARTNum  uart)

Terminates the specified UART device.

Parameters
uartNumber of UART device to terminate.
void kprv_uart_enable_tx_int ( KUARTNum  uart)

Enables UART TX interrupt.

Parameters
uartNumber of UART device.
hal_uart_handle* uart_handle ( KUARTNum  uart)

Helper function to get uart handle.