Go to the documentation of this file.
9 #ifndef __HAL_UART_ADAPTER_H__
10 #define __HAL_UART_ADAPTER_H__
12 #if defined(FSL_RTOS_FREE_RTOS)
33 #ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING
34 #define UART_ADAPTER_NON_BLOCKING_MODE (1U)
36 #ifndef SERIAL_MANAGER_NON_BLOCKING_MODE
37 #define UART_ADAPTER_NON_BLOCKING_MODE (0U)
39 #define UART_ADAPTER_NON_BLOCKING_MODE SERIAL_MANAGER_NON_BLOCKING_MODE
43 #if defined(__GIC_PRIO_BITS)
44 #ifndef HAL_UART_ISR_PRIORITY
45 #define HAL_UART_ISR_PRIORITY (25U)
48 #if defined(configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY)
49 #ifndef HAL_UART_ISR_PRIORITY
50 #define HAL_UART_ISR_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY)
57 #ifndef HAL_UART_ISR_PRIORITY
58 #define HAL_UART_ISR_PRIORITY (3U)
63 #ifndef HAL_UART_ADAPTER_LOWPOWER
64 #define HAL_UART_ADAPTER_LOWPOWER (0U)
68 #if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
69 #define HAL_UART_HANDLE_SIZE (90U + HAL_UART_ADAPTER_LOWPOWER * 16U)
71 #define HAL_UART_HANDLE_SIZE (4U + HAL_UART_ADAPTER_LOWPOWER * 16U)
89 #define UART_HANDLE_DEFINE(name) uint32_t name[((HAL_UART_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
92 #ifndef HAL_UART_TRANSFER_MODE
93 #define HAL_UART_TRANSFER_MODE (0U)
159 #if defined(__cplusplus)
254 #if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
255 #if (defined(HAL_UART_TRANSFER_MODE) && (HAL_UART_TRANSFER_MODE > 0U))
279 void *callbackParam);
400 void *callbackParam);
524 #if (defined(UART_ADAPTER_NON_BLOCKING_MODE) && (UART_ADAPTER_NON_BLOCKING_MODE > 0U))
535 #if defined(__cplusplus)
hal_uart_status_t HAL_UartInit(hal_uart_handle_t handle, hal_uart_config_t *config)
Initializes a UART instance with the UART handle and the user configuration structure.
@ kStatus_HAL_UartBaudrateNotSupport
void * hal_uart_handle_t
The handle of uart adapter.
UART configuration structure.
_hal_uart_status
UART status.
hal_uart_status_t HAL_UartDeinit(hal_uart_handle_t handle)
Deinitializes a UART instance.
_hal_uart_parity_mode
UART parity mode.
hal_uart_parity_mode_t parityMode
void(* hal_uart_transfer_callback_t)(hal_uart_handle_t handle, hal_uart_status_t status, void *callbackParam)
UART transfer callback function.
hal_uart_status_t HAL_UartSendBlocking(hal_uart_handle_t handle, const uint8_t *data, size_t length)
Writes to the TX register using a blocking method.
struct _hal_uart_transfer hal_uart_transfer_t
UART transfer structure.
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
@ kHAL_UartParityDisabled
hal_uart_status_t HAL_UartEnterLowpower(hal_uart_handle_t handle)
Prepares to enter low power consumption.
struct _hal_uart_config hal_uart_config_t
UART configuration structure.
enum _hal_uart_parity_mode hal_uart_parity_mode_t
UART parity mode.
hal_uart_status_t HAL_UartReceiveBlocking(hal_uart_handle_t handle, uint8_t *data, size_t length)
Reads RX data register using a blocking method.
hal_uart_status_t HAL_UartExitLowpower(hal_uart_handle_t handle)
Restores from low power consumption.
@ kStatus_HAL_UartSuccess
hal_uart_stop_bit_count_t stopBitCount
_hal_uart_stop_bit_count
UART stop bit count.
static sai_transceiver_t config
@ kStatus_HAL_UartProtocolError
enum _hal_uart_status hal_uart_status_t
UART status.
enum _hal_uart_stop_bit_count hal_uart_stop_bit_count_t
UART stop bit count.