Lines Matching full:hal

13 #include <hal/i2c_ll.h>
14 #include <hal/i2c_hal.h>
15 #include <hal/gpio_hal.h>
64 i2c_hal_context_t hal; member
208 i2c_ll_master_clr_bus(data->hal.dev); in i2c_master_clear_bus()
210 i2c_ll_update(data->hal.dev); in i2c_master_clear_bus()
226 i2c_ll_get_scl_timing(data->hal.dev, &scl_high_period, &scl_low_period); in i2c_hw_fsm_reset()
227 i2c_ll_get_start_timing(data->hal.dev, &scl_rstart_setup, &scl_start_hold); in i2c_hw_fsm_reset()
228 i2c_ll_get_stop_timing(data->hal.dev, &scl_stop_setup, &scl_stop_hold); in i2c_hw_fsm_reset()
229 i2c_ll_get_sda_timing(data->hal.dev, &sda_sample, &sda_hold); in i2c_hw_fsm_reset()
230 i2c_ll_get_tout(data->hal.dev, &timeout); in i2c_hw_fsm_reset()
231 i2c_ll_get_filter(data->hal.dev, &filter_cfg); in i2c_hw_fsm_reset()
238 i2c_hal_master_init(&data->hal); in i2c_hw_fsm_reset()
239 i2c_ll_disable_intr_mask(data->hal.dev, I2C_LL_INTR_MASK); in i2c_hw_fsm_reset()
240 i2c_ll_clear_intr_mask(data->hal.dev, I2C_LL_INTR_MASK); in i2c_hw_fsm_reset()
241 i2c_ll_set_scl_timing(data->hal.dev, scl_high_period, scl_low_period); in i2c_hw_fsm_reset()
242 i2c_ll_set_start_timing(data->hal.dev, scl_rstart_setup, scl_start_hold); in i2c_hw_fsm_reset()
243 i2c_ll_set_stop_timing(data->hal.dev, scl_stop_setup, scl_stop_hold); in i2c_hw_fsm_reset()
244 i2c_ll_set_sda_timing(data->hal.dev, sda_sample, sda_hold); in i2c_hw_fsm_reset()
245 i2c_ll_set_tout(data->hal.dev, timeout); in i2c_hw_fsm_reset()
246 i2c_ll_set_filter(data->hal.dev, filter_cfg); in i2c_hw_fsm_reset()
248 i2c_ll_master_fsm_rst(data->hal.dev); in i2c_hw_fsm_reset()
251 i2c_ll_update(data->hal.dev); in i2c_hw_fsm_reset()
273 i2c_hal_set_bus_timing(&data->hal, bitrate, sclk, clk_freq_mhz); in i2c_esp32_configure_bitrate()
278 i2c_ll_set_tout(data->hal.dev, timeout_cycles); in i2c_esp32_configure_bitrate()
285 i2c_ll_set_tout(data->hal.dev, I2C_LL_MAX_TIMEOUT); in i2c_esp32_configure_bitrate()
288 i2c_ll_update(data->hal.dev); in i2c_esp32_configure_bitrate()
307 i2c_ll_set_data_mode(data->hal.dev, tx_mode, rx_mode); in i2c_esp32_configure_data_mode()
308 i2c_ll_set_filter(data->hal.dev, I2C_FILTER_CYC_NUM_DEF); in i2c_esp32_configure_data_mode()
309 i2c_ll_update(data->hal.dev); in i2c_esp32_configure_data_mode()
368 i2c_ll_txfifo_rst(data->hal.dev); in i2c_esp32_reset_fifo()
369 i2c_ll_rxfifo_rst(data->hal.dev); in i2c_esp32_reset_fifo()
378 i2c_ll_update(data->hal.dev); in i2c_esp32_transmit()
379 i2c_ll_trans_start(data->hal.dev); in i2c_esp32_transmit()
409 i2c_ll_write_cmd_reg(data->hal.dev, cmd, data->cmd_idx++); in i2c_esp32_master_start()
420 i2c_ll_write_cmd_reg(data->hal.dev, cmd, data->cmd_idx++); in i2c_esp32_master_stop()
432 i2c_ll_write_txfifo(data->hal.dev, &addr_byte, 1); in i2c_esp32_write_addr()
435 i2c_ll_write_txfifo(data->hal.dev, &addr_byte, 1); in i2c_esp32_write_addr()
449 i2c_ll_write_cmd_reg(data->hal.dev, cmd, data->cmd_idx++); in i2c_esp32_write_addr()
450 i2c_ll_write_cmd_reg(data->hal.dev, cmd_end, data->cmd_idx++); in i2c_esp32_write_addr()
451 i2c_ll_master_enable_tx_it(data->hal.dev); in i2c_esp32_write_addr()
489 i2c_ll_write_cmd_reg(data->hal.dev, cmd, data->cmd_idx++); in i2c_esp32_master_read()
490 i2c_ll_write_cmd_reg(data->hal.dev, cmd_end, data->cmd_idx++); in i2c_esp32_master_read()
491 i2c_ll_master_enable_tx_it(data->hal.dev); in i2c_esp32_master_read()
497 i2c_ll_read_rxfifo(data->hal.dev, msg_buf, rd_filled); in i2c_esp32_master_read()
564 i2c_ll_write_txfifo(data->hal.dev, msg_buf, wr_filled); in i2c_esp32_master_write()
565 i2c_ll_write_cmd_reg(data->hal.dev, cmd, data->cmd_idx++); in i2c_esp32_master_write()
566 i2c_ll_write_cmd_reg(data->hal.dev, cmd_end, data->cmd_idx++); in i2c_esp32_master_write()
567 i2c_ll_master_enable_tx_it(data->hal.dev); in i2c_esp32_master_write()
625 while (i2c_ll_is_bus_busy(data->hal.dev)) { in i2c_esp32_transfer()
672 if (data->status == I2C_STATUS_TIMEOUT || i2c_ll_is_bus_busy(data->hal.dev)) { in i2c_esp32_transfer()
681 i2c_ll_disable_intr_mask(data->hal.dev, I2C_LL_INTR_MASK); in i2c_esp32_transfer()
682 i2c_ll_clear_intr_mask(data->hal.dev, I2C_LL_INTR_MASK); in i2c_esp32_transfer()
707 i2c_hal_master_handle_tx_event(&data->hal, &evt_type); in i2c_esp32_isr()
709 i2c_hal_master_handle_rx_event(&data->hal, &evt_type); in i2c_esp32_isr()
777 i2c_hal_master_init(&data->hal); in i2c_esp32_init()
819 .hal = { \