Classes | Macros | Typedefs | Enumerations | Functions
uart.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _hal_uart_config
 UART configuration structure. More...
 
struct  _hal_uart_transfer
 UART transfer structure. More...
 

Macros

#define HAL_UART_ADAPTER_LOWPOWER   (0U)
 
#define HAL_UART_HANDLE_SIZE   (4U + HAL_UART_ADAPTER_LOWPOWER * 16U)
 Definition of uart adapter handle size. More...
 
#define HAL_UART_ISR_PRIORITY   (3U)
 
#define HAL_UART_TRANSFER_MODE   (0U)
 Whether enable transactional function of the UART. (0 - disable, 1 - enable) More...
 
#define UART_ADAPTER_NON_BLOCKING_MODE   (0U)
 Enable or disable UART adapter non-blocking mode (1 - enable, 0 - disable) More...
 
#define UART_HANDLE_DEFINE(name)   uint32_t name[((HAL_UART_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t))]
 Defines the uart handle. More...
 

Typedefs

typedef struct _hal_uart_config hal_uart_config_t
 UART configuration structure. More...
 
typedef void * hal_uart_handle_t
 The handle of uart adapter. More...
 
typedef enum _hal_uart_parity_mode hal_uart_parity_mode_t
 UART parity mode. More...
 
typedef enum _hal_uart_status hal_uart_status_t
 UART status. More...
 
typedef enum _hal_uart_stop_bit_count hal_uart_stop_bit_count_t
 UART stop bit count. More...
 
typedef void(* hal_uart_transfer_callback_t) (hal_uart_handle_t handle, hal_uart_status_t status, void *callbackParam)
 UART transfer callback function. More...
 
typedef struct _hal_uart_transfer hal_uart_transfer_t
 UART transfer structure. More...
 

Enumerations

enum  _hal_uart_parity_mode { kHAL_UartParityDisabled = 0x0U, kHAL_UartParityEven = 0x1U, kHAL_UartParityOdd = 0x2U }
 UART parity mode. More...
 
enum  _hal_uart_status {
  kStatus_HAL_UartSuccess = kStatus_Success, kStatus_HAL_UartTxBusy = MAKE_STATUS(kStatusGroup_HAL_UART, 1), kStatus_HAL_UartRxBusy = MAKE_STATUS(kStatusGroup_HAL_UART, 2), kStatus_HAL_UartTxIdle = MAKE_STATUS(kStatusGroup_HAL_UART, 3),
  kStatus_HAL_UartRxIdle = MAKE_STATUS(kStatusGroup_HAL_UART, 4), kStatus_HAL_UartBaudrateNotSupport, kStatus_HAL_UartProtocolError, kStatus_HAL_UartError = MAKE_STATUS(kStatusGroup_HAL_UART, 7)
}
 UART status. More...
 
enum  _hal_uart_stop_bit_count { kHAL_UartOneStopBit = 0U, kHAL_UartTwoStopBit = 1U }
 UART stop bit count. More...
 

Functions

hal_uart_status_t HAL_UartEnterLowpower (hal_uart_handle_t handle)
 Prepares to enter low power consumption. More...
 
hal_uart_status_t HAL_UartExitLowpower (hal_uart_handle_t handle)
 Restores from low power consumption. More...
 
Initialization and deinitialization
hal_uart_status_t HAL_UartDeinit (hal_uart_handle_t handle)
 Deinitializes a UART instance. More...
 
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. More...
 
Blocking bus Operations
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. More...
 
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. More...
 


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:03