WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_uart_v151_regs_op.h 文件参考
#include "platform_core.h"
#include "hal_uart_v151_regs_def.h"
#include "hal_uart.h"
hal_uart_v151_regs_op.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define HAL_UART_ENABLE_FLAG_NONE   0
 Bitmasks used to configure which UART features to enable in
 
#define HAL_UART_ENABLE_FLAG_RX   (1U << 0)
 
#define HAL_UART_ENABLE_FLAG_TX   (1U << 1)
 
#define HAL_UART_ENABLE_FLAG_CTS   (1U << 2)
 
#define HAL_UART_ENABLE_FLAG_RTS   (1U << 3)
 
#define UART_INT_RTI   HAL_UART_INTERRUPT_RX
 
#define UART_INT_RXI   HAL_UART_INTERRUPT_CHAR_TIMEOUT
 
#define UARTIMSC   0
 

枚举

enum  hal_uart_fifo_t { HAL_UART_FIFO_DISABLED , HAL_UART_FIFO_ENABLED }
 
enum  hal_uart_ptim_mode_t { HAL_UART_PTIM_MODE_DISABLED , HAL_UART_PTIM_MODE_ENABLED }
 
enum  hal_uart_auto_flow_ctl_t { HAL_UART_AUTO_FLOW_CTL_DISABLED , HAL_UART_AUTO_FLOW_CTL_ENABLED }
 
enum  hal_uart_sample_baud_rate_t { HAL_UART_SAMPLE_BAUD_RATE_EIGHT = 0x7 , HAL_UART_SAMPLE_BAUD_RATE_SIXTEEN = 0xf }
 
enum  hal_uart_low_power_req_t { HAL_UART_LOW_POWER_REQ_DISABLED , HAL_UART_LOW_POWER_REQ_ENABLED }
 
enum  hal_uart_dma_config_t {
  HAL_UART_DMA_DISABLE = 0 , HAL_UART_DMA_RX_EN = 1 , HAL_UART_DMA_TX_EN = 2 , HAL_UART_DMA_RX_DISABLE = 3 ,
  HAL_UART_DMA_TX_DISABLE = 4
}
 
enum  hal_uart_interrupt_t {
  HAL_UART_INTERRUPT_MODEM_STATUS = 0x0 , HAL_UART_INTERRUPT_NO_INTERRUPT = 0x1 , HAL_UART_INTERRUPT_TX = 0x2 , HAL_UART_INTERRUPT_RX = 0x4 ,
  HAL_UART_INTERRUPT_RECEIVER_LINE_STATUS = 0x6 , HAL_UART_INTERRUPT_BUSY_DETECT = 0x7 , HAL_UART_INTERRUPT_CHAR_TIMEOUT = 0xC , HAL_UART_INTERRUPT_ERROR ,
  HAL_UART_INTERRUPT_IDLE
}
 
enum  hal_uart_line_error_interrupt_t {
  HAL_UART_RX_FIFO_ERR = 0x1 , HAL_UART_FRAME_ERR = 0x2 , HAL_UART_PARITY_ERR = 0x4 , HAL_UART_OVERRUN_ERR = 0x8 ,
  HAL_UART_BREAK_INTR = 0x10
}
 
enum  uart_stop_bits_t { UART_STOP_BITS_1 = 0 , UART_STOP_BITS_2 = 1 }
 
enum  uart_err_info_index {
  UART_ERR_INFO_UARTLCR_H = 0 , UART_ERR_INFO_UARTCR = 1 , UART_ERR_INFO_UARTIBRD = 2 , UART_ERR_INFO_UARTFBRD = 3 ,
  UART_ERR_INFO_UARTDMACR = 4 , UART_ERR_INFO_UARTRSR = 5 , UART_ERR_INFO_UARTRIS = 6 , UART_ERR_INFO_INT_FLAG = 7 ,
  UART_ERROR_MAX_INFO_NUM
}
 

函数

void hal_uart_uartifls_set_rxiflsel (uart_bus_t bus, uint32_t val)
 
void hal_uart_int_set (uart_bus_t bus, uint32_t reg, uint32_t int_id, uint32_t val)
 
void hal_uart_set_fifo_en (uart_bus_t uart, hal_uart_fifo_t fifo)
 Sets FIFO enabled or not.
 
uint16_t hal_uart_get_rx_fifo_level (uart_bus_t uart)
 Obtains the RX FIFO trigger level in bytes, as configured by hal_uart_init_fifo
 
volatile uint32_t * hal_uart_get_data_register (uart_bus_t uart)
 Returns a pointer to the data register to write or read from.
 
uint32_t hal_uart_get_error_status (uart_bus_t uart)
 Returns a pointer to the error register to read from.
 
void hal_uart_set_baud_rate (uart_bus_t uart, uint32_t baud, uint32_t uart_clk)
 Sets the baud rate.
 
uint32_t hal_uart_get_baud_rate (uart_bus_t uart, uint32_t uart_clk)
 Reads the baud rate back from the registers
 
void hal_uart_set_data_bits (uart_bus_t uart, hal_uart_data_bit_t bits)
 Sets the data bits to use in the uart.
 
void hal_uart_set_stop_bits (uart_bus_t uart, hal_uart_stop_bit_t bits)
 Sets the data bits to use in the uart.
 
void hal_uart_set_parity (uart_bus_t uart, hal_uart_parity_t parity)
 Sets the parity bits to use in the uart.
 
void hal_uart_disable_uart (uart_bus_t uart)
 Disables the uart.
 
void hal_uart_enable_interrupt (uart_bus_t uart, hal_uart_interrupt_t interrupt_type, bool val)
 Enables the uart interrupt type specified
 
void hal_uart_disable_interrupt (uart_bus_t uart, hal_uart_interrupt_t interrupt_type)
 Disables the uart interrupt type specified
 
void hal_uart_clear_interrupt (uart_bus_t uart, hal_uart_interrupt_t interrupt_type)
 Clears the uart interrupt type specified.
 
uint32_t hal_uart_get_fifo_status (uart_bus_t uart)
 Returns the raw fifo status of the uart.
 
void hal_uart_force_tx_isr (uart_bus_t uart)
 Forces the pending excecution of the tx isr in an interrupt context.
 
void hal_uart_force_idle_isr (uart_bus_t uart)
 Forces the pending excecution of the idle isr in an interrupt context.
 
bool hal_uart_switch_trx (uart_bus_t uart, bool switch_trx)
 Switch the TRX of the specified UART, uart_l default value PIN50: rx; PIN51: tx. uart_h default value PIN36: tx; PIN37: rx. uart_m default value PIN30: tx; PIN31: rx.
 
void hal_uart_isr (uart_bus_t uart)
 Generic ISR for UARTs called from the specific handler.
 
void hal_uart_clear_pending (uart_bus_t uart)
 Clear the pending status of the corresponding uart
 
void hal_uart_check_en (uart_bus_t uart, bool val)
 Enable/disable uart parity check.
 
void hal_uart_parity_en (uart_bus_t uart, hal_uart_parity_t val)
 Select uart odd/even parity check.
 
void hal_uart_sir_mode_en (uart_bus_t uart, bool val)
 Enable/disable uart sir mode.
 
void hal_uart_tx_pause_en (uart_bus_t uart, bool val)
 Enable/disable uart tx pause.
 
void hal_uart_set_baud_div (uart_bus_t uart, uint8_t val)
 Sets the sample baud rate to use in the uart.
 
uint32_t hal_uart_get_baud_div (uart_bus_t uart)
 Returns the sample baud rate of the uart.
 
bool hal_uart_get_error_status_parity (uart_bus_t uart)
 Get the parity error status
 
bool hal_uart_get_error_status_fram (uart_bus_t uart)
 Get the frame error status
 
bool hal_uart_get_error_status_break (uart_bus_t uart)
 Get the break error status
 
bool hal_uart_get_error_status_overrun (uart_bus_t uart)
 Get the overrun error status
 
void hal_uart_set_dmaen (uart_bus_t bus, uint32_t val)
 set uart dma_mode
 

变量

uart_reg_tg_hal_uart_reg [UART_BUS_MAX_NUMBER]