|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
宏定义 | |
| #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 |
函数 | |
| 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_t * | g_hal_uart_reg [UART_BUS_MAX_NUMBER] |
| #define HAL_UART_ENABLE_FLAG_CTS (1U << 2) |
| #define HAL_UART_ENABLE_FLAG_NONE 0 |
Bitmasks used to configure which UART features to enable in
| #define HAL_UART_ENABLE_FLAG_RTS (1U << 3) |
| #define HAL_UART_ENABLE_FLAG_RX (1U << 0) |
| #define HAL_UART_ENABLE_FLAG_TX (1U << 1) |
| #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 |
| enum hal_uart_interrupt_t |
| enum hal_uart_ptim_mode_t |
| enum uart_err_info_index |
| enum uart_stop_bits_t |
| void hal_uart_check_en | ( | uart_bus_t | uart, |
| bool | val | ||
| ) |
Enable/disable uart parity check.
| uart | The uart needs to be enable/disable uart parity check. |
| val | True means enable uart parity check, false means disable. |
| void hal_uart_clear_interrupt | ( | uart_bus_t | uart, |
| hal_uart_interrupt_t | interrupt_type | ||
| ) |
Clears the uart interrupt type specified.
| uart | Uart bus. |
| interrupt_type | Uart interrupt type. |
| void hal_uart_clear_pending | ( | uart_bus_t | uart | ) |
Clear the pending status of the corresponding uart
| uart | The uart needs to be clear pending. |
| void hal_uart_disable_interrupt | ( | uart_bus_t | uart, |
| hal_uart_interrupt_t | interrupt_type | ||
| ) |
Disables the uart interrupt type specified
| uart | |
| interrupt_type |
| void hal_uart_disable_uart | ( | uart_bus_t | uart | ) |
Disables the uart.
| uart | Uart bus. |
| void hal_uart_enable_interrupt | ( | uart_bus_t | uart, |
| hal_uart_interrupt_t | interrupt_type, | ||
| bool | val | ||
| ) |
Enables the uart interrupt type specified
| uart | Uart bus. |
| interrupt_type | Uart interrupt type |
| val | Enable or disable |
| void hal_uart_force_idle_isr | ( | uart_bus_t | uart | ) |
Forces the pending excecution of the idle isr in an interrupt context.
| uart | Uart bus |
| void hal_uart_force_tx_isr | ( | uart_bus_t | uart | ) |
Forces the pending excecution of the tx isr in an interrupt context.
| uart | Uart bus |
| uint32_t hal_uart_get_baud_div | ( | uart_bus_t | uart | ) |
Returns the sample baud rate of the uart.
| uart |
| uint32_t hal_uart_get_baud_rate | ( | uart_bus_t | uart, |
| uint32_t | uart_clk | ||
| ) |
Reads the baud rate back from the registers
| uart | The Uart bus to read from |
| uart_clk | Uart clock. |
| volatile uint32_t * hal_uart_get_data_register | ( | uart_bus_t | uart | ) |
Returns a pointer to the data register to write or read from.
| uart | Uart bus. |
| uint32_t hal_uart_get_error_status | ( | uart_bus_t | uart | ) |
Returns a pointer to the error register to read from.
Get the error status
| uart | The uart needs to get err status. |
| bool hal_uart_get_error_status_break | ( | uart_bus_t | uart | ) |
Get the break error status
| uart | The uart needs to get err status. |
| bool hal_uart_get_error_status_fram | ( | uart_bus_t | uart | ) |
Get the frame error status
| uart | The uart needs to get err status. |
| bool hal_uart_get_error_status_overrun | ( | uart_bus_t | uart | ) |
Get the overrun error status
| uart | The uart needs to get err status. |
| bool hal_uart_get_error_status_parity | ( | uart_bus_t | uart | ) |
Get the parity error status
| uart | The uart needs to get err status. |
| uint32_t hal_uart_get_fifo_status | ( | uart_bus_t | uart | ) |
Returns the raw fifo status of the uart.
| uart |
| 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
| uart | Uart bus. |
| void hal_uart_int_set | ( | uart_bus_t | bus, |
| uint32_t | reg, | ||
| uint32_t | int_id, | ||
| uint32_t | val | ||
| ) |
| void hal_uart_isr | ( | uart_bus_t | uart | ) |
Generic ISR for UARTs called from the specific handler.
| uart | Uart that triggered the interrupt |
| void hal_uart_parity_en | ( | uart_bus_t | uart, |
| hal_uart_parity_t | val | ||
| ) |
Select uart odd/even parity check.
| uart | The uart needs to be enable/disable uart parity check. |
| val | Selected parity check mods. |
| void hal_uart_set_baud_div | ( | uart_bus_t | uart, |
| uint8_t | val | ||
| ) |
Sets the sample baud rate to use in the uart.
| uart | Uart bus. |
| val | Sample baud rate. |
| void hal_uart_set_baud_rate | ( | uart_bus_t | uart, |
| uint32_t | baud, | ||
| uint32_t | uart_clk | ||
| ) |
Sets the baud rate.
| uart | Uart bus. |
| baud | Baud rate. |
| uart_clk | Uart clock. |
| 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.
| uart | Uart bus. |
| bits | Data bits. |
| void hal_uart_set_dmaen | ( | uart_bus_t | bus, |
| uint32_t | val | ||
| ) |
set uart dma_mode
| bus | The uart needs to set dma |
| val | 0x0 dma extra diabled, 0x1 dma extra enbale |
| void hal_uart_set_fifo_en | ( | uart_bus_t | uart, |
| hal_uart_fifo_t | fifo | ||
| ) |
Sets FIFO enabled or not.
| uart | Uart bus. |
| fifo | FIFO state. |
| void hal_uart_set_parity | ( | uart_bus_t | uart, |
| hal_uart_parity_t | parity | ||
| ) |
Sets the parity bits to use in the uart.
| uart | Uart bus. |
| parity | Parity bits. |
| 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.
| uart | Uart bus. |
| bits | Data bits. |
| void hal_uart_sir_mode_en | ( | uart_bus_t | uart, |
| bool | val | ||
| ) |
Enable/disable uart sir mode.
| uart | The uart needs to be enable/disable uart sir mode. |
| val | True means enable uart sir mode, false means disable. |
| 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.
| uart | The uart to switch. |
| switch_trx | false: the default uart trx status; true: reverse the uart trx status. |
| void hal_uart_tx_pause_en | ( | uart_bus_t | uart, |
| bool | val | ||
| ) |
Enable/disable uart tx pause.
| uart | The uart needs to be enable/disable uart tx pause. |
| val | True means enable uart tx pause, false means disable. |
| void hal_uart_uartifls_set_rxiflsel | ( | uart_bus_t | bus, |
| uint32_t | val | ||
| ) |
|
extern |
Base addresses of all UARTS supported by the core