Lines Matching refs:hal

11 void uart_hal_get_sclk(uart_hal_context_t *hal, uart_sclk_t *sclk)  in uart_hal_get_sclk()  argument
13 uart_ll_get_sclk(hal->dev, sclk); in uart_hal_get_sclk()
16 void uart_hal_get_baudrate(uart_hal_context_t *hal, uint32_t *baud_rate, uint32_t sclk_freq) in uart_hal_get_baudrate() argument
18 *baud_rate = uart_ll_get_baudrate(hal->dev, sclk_freq); in uart_hal_get_baudrate()
21 void uart_hal_set_stop_bits(uart_hal_context_t *hal, uart_stop_bits_t stop_bit) in uart_hal_set_stop_bits() argument
23 uart_ll_set_stop_bits(hal->dev, stop_bit); in uart_hal_set_stop_bits()
26 void uart_hal_get_stop_bits(uart_hal_context_t *hal, uart_stop_bits_t *stop_bit) in uart_hal_get_stop_bits() argument
28 uart_ll_get_stop_bits(hal->dev, stop_bit); in uart_hal_get_stop_bits()
31 void uart_hal_set_data_bit_num(uart_hal_context_t *hal, uart_word_length_t data_bit) in uart_hal_set_data_bit_num() argument
33 uart_ll_set_data_bit_num(hal->dev, data_bit); in uart_hal_set_data_bit_num()
36 void uart_hal_get_data_bit_num(uart_hal_context_t *hal, uart_word_length_t *data_bit) in uart_hal_get_data_bit_num() argument
38 uart_ll_get_data_bit_num(hal->dev, data_bit); in uart_hal_get_data_bit_num()
41 void uart_hal_set_parity(uart_hal_context_t *hal, uart_parity_t parity_mode) in uart_hal_set_parity() argument
43 uart_ll_set_parity(hal->dev, parity_mode); in uart_hal_set_parity()
46 void uart_hal_get_parity(uart_hal_context_t *hal, uart_parity_t *parity_mode) in uart_hal_get_parity() argument
48 uart_ll_get_parity(hal->dev, parity_mode); in uart_hal_get_parity()
51 void uart_hal_set_hw_flow_ctrl(uart_hal_context_t *hal, uart_hw_flowcontrol_t flow_ctrl, uint8_t rx… in uart_hal_set_hw_flow_ctrl() argument
53 uart_ll_set_hw_flow_ctrl(hal->dev, flow_ctrl, rx_thresh); in uart_hal_set_hw_flow_ctrl()
56 void uart_hal_get_hw_flow_ctrl(uart_hal_context_t *hal, uart_hw_flowcontrol_t *flow_ctrl) in uart_hal_get_hw_flow_ctrl() argument
58 uart_ll_get_hw_flow_ctrl(hal->dev, flow_ctrl); in uart_hal_get_hw_flow_ctrl()
61 void uart_hal_set_sw_flow_ctrl(uart_hal_context_t *hal, uart_sw_flowctrl_t *flow_ctrl, bool sw_flow… in uart_hal_set_sw_flow_ctrl() argument
63 uart_ll_set_sw_flow_ctrl(hal->dev, flow_ctrl, sw_flow_ctrl_en); in uart_hal_set_sw_flow_ctrl()
66 void uart_hal_set_at_cmd_char(uart_hal_context_t *hal, uart_at_cmd_t *at_cmd) in uart_hal_set_at_cmd_char() argument
68 uart_ll_set_at_cmd_char(hal->dev, at_cmd); in uart_hal_set_at_cmd_char()
71 void uart_hal_set_tx_idle_num(uart_hal_context_t *hal, uint16_t idle_num) in uart_hal_set_tx_idle_num() argument
73 uart_ll_set_tx_idle_num(hal->dev, idle_num); in uart_hal_set_tx_idle_num()
76 void uart_hal_set_dtr(uart_hal_context_t *hal, int active_level) in uart_hal_set_dtr() argument
78 uart_ll_set_dtr_active_level(hal->dev, active_level); in uart_hal_set_dtr()
81 void uart_hal_set_rxfifo_full_thr(uart_hal_context_t *hal, uint32_t full_thrhd) in uart_hal_set_rxfifo_full_thr() argument
83 uart_ll_set_rxfifo_full_thr(hal->dev, full_thrhd); in uart_hal_set_rxfifo_full_thr()
86 void uart_hal_set_txfifo_empty_thr(uart_hal_context_t *hal, uint32_t empty_thrhd) in uart_hal_set_txfifo_empty_thr() argument
88 uart_ll_set_txfifo_empty_thr(hal->dev, empty_thrhd); in uart_hal_set_txfifo_empty_thr()
91 void uart_hal_set_wakeup_thrd(uart_hal_context_t *hal, uint32_t wakeup_thrd) in uart_hal_set_wakeup_thrd() argument
93 uart_ll_set_wakeup_thrd(hal->dev, wakeup_thrd); in uart_hal_set_wakeup_thrd()
96 void uart_hal_get_wakeup_thrd(uart_hal_context_t *hal, uint32_t *wakeup_thrd) in uart_hal_get_wakeup_thrd() argument
98 *wakeup_thrd = uart_ll_get_wakeup_thrd(hal->dev); in uart_hal_get_wakeup_thrd()
101 void uart_hal_set_mode(uart_hal_context_t *hal, uart_mode_t mode) in uart_hal_set_mode() argument
103 uart_ll_set_mode(hal->dev, mode); in uart_hal_set_mode()
106 bool uart_hal_is_mode_rs485_half_duplex(uart_hal_context_t *hal) in uart_hal_is_mode_rs485_half_duplex() argument
108 return uart_ll_is_mode_rs485_half_duplex(hal->dev); in uart_hal_is_mode_rs485_half_duplex()
111 bool uart_hal_is_hw_rts_en(uart_hal_context_t *hal) in uart_hal_is_hw_rts_en() argument
113 return uart_ll_is_hw_rts_en(hal->dev); in uart_hal_is_hw_rts_en()
116 void uart_hal_inverse_signal(uart_hal_context_t *hal, uint32_t inv_mask) in uart_hal_inverse_signal() argument
118 uart_ll_inverse_signal(hal->dev, inv_mask); in uart_hal_inverse_signal()
121 void uart_hal_set_loop_back(uart_hal_context_t *hal, bool loop_back_en) in uart_hal_set_loop_back() argument
123 uart_ll_set_loop_back(hal->dev, loop_back_en); in uart_hal_set_loop_back()
126 void uart_hal_init(uart_hal_context_t *hal, uart_port_t uart_num) in uart_hal_init() argument
129 uart_ll_set_mode(hal->dev, UART_MODE_UART); in uart_hal_init()
131 uart_ll_set_parity(hal->dev, UART_PARITY_DISABLE); in uart_hal_init()
133 uart_ll_set_data_bit_num(hal->dev, UART_DATA_8_BITS); in uart_hal_init()
135 uart_ll_set_stop_bits(hal->dev, UART_STOP_BITS_1); in uart_hal_init()
137 uart_ll_set_tx_idle_num(hal->dev, 0); in uart_hal_init()
139 uart_ll_set_hw_flow_ctrl(hal->dev, UART_HW_FLOWCTRL_DISABLE, 100); in uart_hal_init()
142 uint8_t uart_hal_get_symb_len(uart_hal_context_t *hal) in uart_hal_get_symb_len() argument
148 uart_ll_get_data_bit_num(hal->dev, &data_bit); in uart_hal_get_symb_len()
149 uart_ll_get_stop_bits(hal->dev, &stop_bit); in uart_hal_get_symb_len()
150 uart_ll_get_parity(hal->dev, &parity_mode); in uart_hal_get_symb_len()
157 void uart_hal_set_rx_timeout(uart_hal_context_t *hal, const uint8_t tout) in uart_hal_set_rx_timeout() argument
159 uint8_t symb_len = uart_hal_get_symb_len(hal); in uart_hal_set_rx_timeout()
160 uart_ll_set_rx_tout(hal->dev, symb_len * tout); in uart_hal_set_rx_timeout()
163 uint16_t uart_hal_get_max_rx_timeout_thrd(uart_hal_context_t *hal) in uart_hal_get_max_rx_timeout_thrd() argument
165 uint8_t symb_len = uart_hal_get_symb_len(hal); in uart_hal_get_max_rx_timeout_thrd()
166 uint16_t max_tout_thresh = uart_ll_max_tout_thrd(hal->dev); in uart_hal_get_max_rx_timeout_thrd()
170 int8_t uart_hal_get_port_num(uart_hal_context_t *hal) in uart_hal_get_port_num() argument
172 if (hal->dev == (uart_dev_t *)&UART0) { in uart_hal_get_port_num()
174 } else if (hal->dev == (uart_dev_t *)&UART1) { in uart_hal_get_port_num()
177 } else if (hal->dev == (uart_dev_t *)&UART2) { in uart_hal_get_port_num()