|
| #define | hal_uart_get_high_8bit(val) ((val) >> 8) |
| |
| #define | hal_uart_get_low_8bit(val) ((val) & 0xff) |
| |
| #define | round_off(val) ((uint32_t)((val) + 1 / 2)) |
| |
| #define | HAL_UART_FIFO_DEPTH_SHIFT_2 2 |
| |
| #define | HAL_UART_FIFO_DEPTH_MINUS_2 2 |
| |
| #define | HAL_UART_FIFO_DEPTH_MULTIPLE 16 |
| |
| #define | HAL_UART_BARD_LEFT_SHIFT_2 2 |
| |
| #define | HAL_UART_BARD_LEFT_SHIFT_6 6 |
| |
| #define | HAL_UART_INIT_DELAY_10US 10 |
| |
| #define | IBRD_NEED_BAUD_OFFSET_NUM 4 |
| |
| #define | REMAINDER_NEED_BAUD_OFFSET_NUM 4 |
| |
| #define | HAL_UART_GET_BAUD_RATE_SHIFT 8 |
| |
| #define | HAL_UART_FORCE_TX_ISR_FLAG 0x01 |
| |
| #define | HAL_UART_FORCE_IDLE_ISR_FLAG 0x02 |
| |
| #define | hal_uart_print_err(log_id, fmt, count, args...) BASE_PRINT_ERR(CONNECT(LOG_BCORE_PLT_DRIVER_UART, log_id), fmt, count, ##args) |
| |
| #define | hal_uart_print_info(log_id, fmt, count, args...) BASE_PRINT_INFO(CONNECT(LOG_BCORE_PLT_DRIVER_UART, log_id), fmt, count, ##args) |
| |
|
| void | hal_uart_init_fifo (uart_bus_t uart, hal_uart_fifo_int_lvl_t rx_level, hal_uart_fifo_int_lvl_t tx_level) |
| | Sets the FIFO interrupt leves for receiving and transmitting.
|
| |
| 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_ptim_en (uart_bus_t uart, bool value) |
| | UART TX interrupt and DMA request signal trigger by TX fifo level.
|
| |
| void | hal_uart_auto_flow_ctl_en (uart_bus_t bus, hal_uart_auto_flow_ctl_t auto_flow) |
| |
| 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_fifo_depth (uart_bus_t 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
|
| |
| 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.
|
| |
| 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_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_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_enable_interrupt (uart_bus_t uart, hal_uart_interrupt_t interrupt_type, bool val) |
| | Enables 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.
|
| |
| void | hal_uart_disable_uart (uart_bus_t uart) |
| | Disables the uart.
|
| |
| bool | hal_uart_is_rx_fifo_full (uart_bus_t uart) |
| |
| 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.
|
| |
| 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.
|
| |
| void | hal_uart_irq_handler (uart_bus_t uart) |
| | UART中断处理函数
|
| |
| 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) |
| |
| hal_uart_funcs_t * | hal_uart_v151_funcs_get (void) |
| |