MSP430F5529 UART API¶
-
group
MSP430F5529_HAL_UART
Functions
-
hal_uart_handle *
uart_handle
(KUARTNum uart)¶ Internal function to get appropriate UART handle based on UART num.
Helper function to get UART handle.
- Return
- hal_uart_handle pointer
- Return
- hal_uart_handle* pointer to UART device structure
- Parameters
uart
: UART bus num
- Parameters
uart
: UART device number
-
static hal_uart_device
uart_dev
(KUARTNum uart)¶ Helper function to convert UART device option.
- Return
- hal_uart_device handle for UART device
- Parameters
uart
: UART device number
-
static hal_uart_baudrate
uart_baud
(long int baud)¶ Helper function to convert baud option.
- Return
- hal_uart_baudrate converted baud rate
- Parameters
baud
: UART baud rate
-
static hal_uart_parity
uart_parity
(KParity parity)¶ Helper function to convert parity option.
- Return
- hal_uart_parity converted party value
- Parameters
parity
: UART parity setting
-
static hal_uart_stopbits
uart_stopbits
(KStopBits stopbits)¶ Helper function to convert stop bits option.
- Return
- hal_uart_stopbits converted stop bits value
- Parameters
stopbits
: UART stop bits setting
-
static hal_uart_wordlen
uart_wordlen
(KWordLen wordlen)¶ Helper function to convert word len option.
- Return
- hal_uart_wordlen converted word length value
- Parameters
wordlen
: UART word length setting
-
KUARTStatus
kprv_uart_dev_init
(KUARTNum uart)¶ Creates and sets up specified UART device.
- Return
- KUARTStatus UART_OK on success, otherwise failure
- Parameters
uart
: Number of UART device to setup.
-
void
kprv_uart_dev_terminate
(KUARTNum uart)¶ Terminates the specified UART device.
- Parameters
uart
: Number of UART device to terminate.
-
void
kprv_uart_enable_tx_int
(KUARTNum uart)¶ Enables UART TX interrupt.
- Parameters
uart
: Number of UART device.
-
void
hal_uart_interrupt
(hal_uart_handle *handle)¶ This function handles the rx/tx interrupts using FreeRTOS queues.
- Parameters
handle
: UART handle
-
KUARTStatus
k_uart_write_immediate
(KUARTNum uart, char c)¶ Write a character directly to the uart interface.
- Return
- KUARTStatus UART_OK if success, otherwise failure
- Parameters
uart
: UART busc
: character to write
-
KUARTStatus
k_uart_write_immediate_str
(KUARTNum uart, uint8_t *ptr, uint8_t len)¶ Write a string directly to the UART interface.
- Return
- KUARTStatus UART_OK if success, otherwise failure
- Parameters
uart
: UART busptr
: buffer to write data fromlen
: length of data to write
-
hal_uart_handle *