Home
last modified time | relevance | path

Searched full:hal (Results 1 – 25 of 827) sorted by relevance

12345678910>>...34

/hal_espressif-latest/components/hal/
Dspi_slave_hd_hal.c7 // The HAL layer for SPI Slave HD
17 #include "hal/spi_slave_hd_hal.h"
18 #include "hal/assert.h"
23 #include "hal/gdma_ll.h"
46 static void s_spi_slave_hd_hal_dma_init_config(const spi_slave_hd_hal_context_t *hal) in s_spi_slave_hd_hal_dma_init_config() argument
48 spi_dma_ll_rx_enable_burst_data(hal->dma_in, hal->rx_dma_chan, 1); in s_spi_slave_hd_hal_dma_init_config()
49 spi_dma_ll_tx_enable_burst_data(hal->dma_out, hal->tx_dma_chan, 1); in s_spi_slave_hd_hal_dma_init_config()
50 spi_dma_ll_rx_enable_burst_desc(hal->dma_in, hal->rx_dma_chan, 1); in s_spi_slave_hd_hal_dma_init_config()
51 spi_dma_ll_tx_enable_burst_desc(hal->dma_out, hal->tx_dma_chan, 1); in s_spi_slave_hd_hal_dma_init_config()
52 spi_dma_ll_enable_out_auto_wrback(hal->dma_out, hal->tx_dma_chan, 1); in s_spi_slave_hd_hal_dma_init_config()
[all …]
Dwdt_hal_iram.c9 #include "hal/wdt_types.h"
10 #include "hal/wdt_hal.h"
14 void wdt_hal_init(wdt_hal_context_t *hal, wdt_inst_t wdt_inst, uint32_t prescaler, bool enable_intr) in wdt_hal_init() argument
16 //Initialize HAL context in wdt_hal_init()
17 memset(hal, 0, sizeof(wdt_hal_context_t)); in wdt_hal_init()
19 hal->mwdt_dev = &TIMERG0; in wdt_hal_init()
23 hal->mwdt_dev = &TIMERG1; in wdt_hal_init()
27 hal->rwdt_dev = RWDT_DEV_GET(); in wdt_hal_init()
29 hal->inst = wdt_inst; in wdt_hal_init()
31 if (hal->inst == WDT_RWDT) { in wdt_hal_init()
[all …]
Dspi_slave_hal_iram.c1 #include "hal/spi_slave_hal.h"
2 #include "hal/spi_ll.h"
8 #include "hal/gdma_ll.h"
22 bool spi_slave_hal_usr_is_done(spi_slave_hal_context_t* hal) in spi_slave_hal_usr_is_done() argument
24 return spi_ll_usr_is_done(hal->hw); in spi_slave_hal_usr_is_done()
27 void spi_slave_hal_user_start(const spi_slave_hal_context_t *hal) in spi_slave_hal_user_start() argument
29 spi_ll_clear_int_stat(hal->hw); //clear int bit in spi_slave_hal_user_start()
30 spi_ll_user_start(hal->hw); in spi_slave_hal_user_start()
33 void spi_slave_hal_prepare_data(const spi_slave_hal_context_t *hal) in spi_slave_hal_prepare_data() argument
35 if (hal->use_dma) { in spi_slave_hal_prepare_data()
[all …]
Duart_hal.c7 // The HAL layer for UART (common part)
8 #include "hal/uart_hal.h"
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()
[all …]
Dsystimer_hal.c10 #include "hal/systimer_hal.h"
11 #include "hal/systimer_ll.h"
12 #include "hal/systimer_types.h"
13 #include "hal/assert.h"
15 void systimer_hal_init(systimer_hal_context_t *hal) in systimer_hal_init() argument
17 hal->dev = &SYSTIMER; in systimer_hal_init()
18 systimer_ll_enable_clock(hal->dev, true); in systimer_hal_init()
24 void systimer_hal_deinit(systimer_hal_context_t *hal) in systimer_hal_deinit() argument
29 systimer_ll_enable_clock(hal->dev, false); in systimer_hal_deinit()
30 hal->dev = NULL; in systimer_hal_deinit()
[all …]
Dledc_hal_iram.c7 // The HAL layer for LEDC (common part, in iram)
11 #include "hal/ledc_hal.h"
13 void ledc_hal_ls_channel_update(ledc_hal_context_t *hal, ledc_channel_t channel_num) in ledc_hal_ls_channel_update() argument
15 ledc_ll_ls_channel_update(hal->dev, hal->speed_mode, channel_num); in ledc_hal_ls_channel_update()
18 void ledc_hal_set_duty_start(ledc_hal_context_t *hal, ledc_channel_t channel_num, bool duty_start) in ledc_hal_set_duty_start() argument
20 ledc_ll_set_duty_start(hal->dev, hal->speed_mode, channel_num, duty_start); in ledc_hal_set_duty_start()
23 void ledc_hal_set_duty_int_part(ledc_hal_context_t *hal, ledc_channel_t channel_num, uint32_t duty_… in ledc_hal_set_duty_int_part() argument
25 ledc_ll_set_duty_int_part(hal->dev, hal->speed_mode, channel_num, duty_val); in ledc_hal_set_duty_int_part()
28 void ledc_hal_set_hpoint(ledc_hal_context_t *hal, ledc_channel_t channel_num, uint32_t hpoint_val) in ledc_hal_set_hpoint() argument
30 ledc_ll_set_hpoint(hal->dev, hal->speed_mode, channel_num, hpoint_val); in ledc_hal_set_hpoint()
[all …]
Dsdio_slave_hal.c7 // The HAL layer for SDIO slave (common part)
12 #include "hal/sdio_slave_types.h"
14 #include "hal/sdio_slave_hal.h"
15 #include "hal/assert.h"
16 #include "hal/log.h"
28 static esp_err_t init_send_queue(sdio_slave_context_t *hal);
152 void sdio_slave_hal_init(sdio_slave_context_t *hal) in sdio_slave_hal_init() argument
154 hal->host = sdio_slave_ll_get_host(0); in sdio_slave_hal_init()
155 hal->slc = sdio_slave_ll_get_slc(0); in sdio_slave_hal_init()
156 hal->hinf = sdio_slave_ll_get_hinf(0); in sdio_slave_hal_init()
[all …]
Di2s_hal.c8 // The HAL layer for I2S (common part)
11 #include "hal/i2s_hal.h"
74 void i2s_hal_init(i2s_hal_context_t *hal, int port_id) in i2s_hal_init() argument
77 hal->dev = I2S_LL_GET_HW(port_id); in i2s_hal_init()
80 void i2s_hal_set_tx_clock(i2s_hal_context_t *hal, const i2s_hal_clock_info_t *clk_info, i2s_clock_s… in i2s_hal_set_tx_clock() argument
84 i2s_ll_tx_enable_clock(hal->dev); in i2s_hal_set_tx_clock()
85 i2s_ll_mclk_bind_to_tx_clk(hal->dev); in i2s_hal_set_tx_clock()
87 i2s_ll_tx_clk_set_src(hal->dev, clk_src); in i2s_hal_set_tx_clock()
89 i2s_ll_tx_set_mclk(hal->dev, &mclk_div); in i2s_hal_set_tx_clock()
90 i2s_ll_tx_set_bck_div_num(hal->dev, clk_info->bclk_div); in i2s_hal_set_tx_clock()
[all …]
Dcam_hal.c7 #include "hal/cam_ll.h"
8 #include "hal/cam_hal.h"
14 * @param hal CAM object data pointer
19 static void cam_hal_set_line_int_num(cam_hal_context_t *hal, uint32_t num) in cam_hal_set_line_int_num() argument
22 cam_ll_enable_hs_line_int(hal->hw, 1); in cam_hal_set_line_int_num()
23 cam_ll_set_line_int_num(hal->hw, num); in cam_hal_set_line_int_num()
25 cam_ll_enable_hs_line_int(hal->hw, 0); in cam_hal_set_line_int_num()
26 cam_ll_set_line_int_num(hal->hw, 0); in cam_hal_set_line_int_num()
33 * @param hal CAM object data pointer
38 static void cam_hal_set_vsync_filter_num(cam_hal_context_t *hal, uint32_t num) in cam_hal_set_vsync_filter_num() argument
[all …]
Di2c_hal.c8 #include "hal/i2c_hal.h"
9 #include "hal/i2c_ll.h"
10 #include "hal/i2c_types.h"
14 void i2c_hal_slave_init(i2c_hal_context_t *hal) in i2c_hal_slave_init() argument
16 i2c_ll_slave_init(hal->dev); in i2c_hal_slave_init()
18 i2c_ll_set_fifo_mode(hal->dev, true); in i2c_hal_slave_init()
20 i2c_ll_set_data_mode(hal->dev, I2C_DATA_MODE_MSB_FIRST, I2C_DATA_MODE_MSB_FIRST); in i2c_hal_slave_init()
22 i2c_ll_txfifo_rst(hal->dev); in i2c_hal_slave_init()
23 i2c_ll_rxfifo_rst(hal->dev); in i2c_hal_slave_init()
27 void i2c_hal_set_bus_timing(i2c_hal_context_t *hal, int scl_freq, i2c_clock_source_t src_clk, int s… in i2c_hal_set_bus_timing() argument
[all …]
Dmcpwm_hal.c9 #include "hal/mcpwm_hal.h"
10 #include "hal/mcpwm_ll.h"
12 void mcpwm_hal_init(mcpwm_hal_context_t *hal, const mcpwm_hal_init_config_t *init_config) in mcpwm_hal_init() argument
14 hal->dev = MCPWM_LL_GET_HW(init_config->group_id); in mcpwm_hal_init()
15 mcpwm_ll_group_enable_shadow_mode(hal->dev); in mcpwm_hal_init()
16 mcpwm_ll_group_flush_shadow(hal->dev); in mcpwm_hal_init()
19 void mcpwm_hal_deinit(mcpwm_hal_context_t *hal) in mcpwm_hal_deinit() argument
21 hal->dev = NULL; in mcpwm_hal_deinit()
24 void mcpwm_hal_timer_reset(mcpwm_hal_context_t *hal, int timer_id) in mcpwm_hal_timer_reset() argument
26 mcpwm_ll_timer_set_count_mode(hal->dev, timer_id, MCPWM_TIMER_COUNT_MODE_PAUSE); in mcpwm_hal_timer_reset()
[all …]
Dspi_slave_hal.c1 #include "hal/spi_slave_hal.h"
2 #include "hal/spi_ll.h"
8 #include "hal/gdma_ll.h"
18 static void s_spi_slave_hal_dma_init_config(const spi_slave_hal_context_t *hal) in s_spi_slave_hal_dma_init_config() argument
20 spi_dma_ll_rx_enable_burst_data(hal->dma_in, hal->rx_dma_chan, 1); in s_spi_slave_hal_dma_init_config()
21 spi_dma_ll_tx_enable_burst_data(hal->dma_out, hal->tx_dma_chan, 1); in s_spi_slave_hal_dma_init_config()
22 spi_dma_ll_rx_enable_burst_desc(hal->dma_in, hal->rx_dma_chan, 1); in s_spi_slave_hal_dma_init_config()
23 spi_dma_ll_tx_enable_burst_desc(hal->dma_out, hal->tx_dma_chan, 1); in s_spi_slave_hal_dma_init_config()
26 void spi_slave_hal_init(spi_slave_hal_context_t *hal, const spi_slave_hal_config_t *hal_config) in spi_slave_hal_init() argument
28 memset(hal, 0, sizeof(spi_slave_hal_context_t)); in spi_slave_hal_init()
[all …]
/hal_espressif-latest/components/hal/include/hal/
Dgpio_hal.h9 * The hal is not public api, don't use in application code.
10 * See readme.md in hal/include/hal/readme.md
13 // The HAL layer for GPIO
19 #include "hal/gpio_ll.h"
20 #include "hal/gpio_types.h"
30 * Context that should be maintained by both the driver and the HAL
40 * @param hal Context of the HAL layer
52 #define gpio_hal_get_io_config(hal, gpio_num, pu, pd, ie, oe, od, drv, fun_sel, sig_out, slp_sel) \ argument
53 … gpio_ll_get_io_config((hal)->dev, gpio_num, pu, pd, ie, oe, od, drv, fun_sel, sig_out, slp_sel)
58 * @param hal Context of the HAL layer
[all …]
Dledc_hal.h9 * The hal is not public api, don't use in application code.
10 * See readme.md in hal/include/hal/readme.md
13 // The HAL layer for LEDC.
14 // There is no parameter check in the hal layer, so the caller must ensure the correctness of the p…
18 #include "hal/ledc_ll.h"
19 #include "hal/ledc_types.h"
23 * Context that should be maintained by both the driver and the HAL
33 * @param hal Context of the HAL layer
38 #define ledc_hal_set_slow_clk_sel(hal, slow_clk_sel) ledc_ll_set_slow_clk_sel((hal)->dev, slow_clk… argument
43 * @param hal Context of the HAL layer
[all …]
Duart_hal.h9 * The hal is not public api, don't use in application code.
10 * See readme.md in hal/include/hal/readme.md
13 // The HAL layer for UART.
14 // There is no parameter check in the hal layer, so the caller must ensure the correctness of the p…
22 #include "hal/uart_ll.h"
23 #include "hal/uart_types.h"
26 * Context that should be maintained by both the driver and the HAL
35 * @param hal Context of the HAL layer
41 #define uart_hal_set_baudrate(hal, baud_rate, sclk_freq) uart_ll_set_baudrate((hal)->dev, baud_rate… argument
45 * @param hal Context of the HAL layer
[all …]
Di2s_hal.h9 * The hal is not public api, don't use in application code.
10 * See readme.md in hal/include/hal/readme.md
13 // The HAL layer for I2S.
14 // There is no parameter check in the hal layer, so the caller must ensure the correctness of the p…
19 #include "hal/i2s_types.h"
20 #include "hal/i2s_ll.h"
109 * Context that should be maintained by both the driver and the HAL
116 * @brief Init I2S hal context
118 * @param hal Context of the HAL layer
121 void i2s_hal_init(i2s_hal_context_t *hal, int port_id);
[all …]
Dpau_hal.h7 // The HAL layer for PAU (Power Assist Unit)
16 #include "hal/pau_ll.h"
17 #include "hal/pau_types.h"
26 * @param hal regdma hal context
29 void pau_hal_set_regdma_entry_link_addr(pau_hal_context_t *hal, pau_regdma_link_addr_t *link_addr);
35 * @param hal regdma hal context
38 #define pau_hal_set_regdma_modem_link_addr(hal, addr) pau_ll_set_regdma_wifimac_link_addr((hal)->… argument
43 * @param hal regdma hal context
46 void pau_hal_start_regdma_modem_link(pau_hal_context_t *hal, bool backup_or_restore);
51 * @param hal regdma hal context
[all …]
Di2c_hal.h9 * The hal is not public api, don't use in application code.
10 * See readme.md in hal/include/hal/readme.md
13 // The HAL layer for I2C
17 #include "hal/i2c_ll.h"
18 #include "hal/i2c_types.h"
25 * @brief I2C hal Context definition
36 * @param hal Context of the HAL layer
41 void i2c_hal_slave_init(i2c_hal_context_t *hal);
48 * @param hal Context of the HAL layer
53 void i2c_hal_master_init(i2c_hal_context_t *hal);
[all …]
Dsdio_slave_hal.h9 * The hal is not public api, don't use in application code.
10 * See readme.md in hal/include/hal/readme.md
13 // The HAL layer for SDIO slave (common part)
15 // SDIO slave HAL usages:
24 the SDIO slave peripheral are completely independent. Likewise, this HAL is organized in such a
35 is ready to send/receive data. The HAL resets the counters during initialization, and the host shou…
39 In order to avoid copying data to/from the FIFOs or memory buffers each time, the HAL layer
41 buffers to be queued for transmission/reception. Once a buffer is queued, the HAL takes ownership
47 The HAL is used as below:
58 The HAL initialize this descriptors with the determined length and maybe some extra data.
[all …]
/hal_espressif-latest/components/hal/esp32c6/
Dmodem_clock_hal.c7 // The HAL layer for MODEM CLOCK (ESP32-C6 specific part)
11 #include "hal/modem_clock_hal.h"
12 #include "hal/modem_clock_types.h"
13 #include "hal/efuse_hal.h"
14 #include "hal/assert.h"
22 void IRAM_ATTR modem_clock_hal_set_clock_domain_icg_bitmap(modem_clock_hal_context_t *hal, modem_cl… in modem_clock_hal_set_clock_domain_icg_bitmap() argument
28 modem_syscon_ll_set_modem_apb_icg_bitmap(hal->syscon_dev, bitmap); in modem_clock_hal_set_clock_domain_icg_bitmap()
31 modem_syscon_ll_set_modem_periph_icg_bitmap(hal->syscon_dev, bitmap); in modem_clock_hal_set_clock_domain_icg_bitmap()
34 modem_syscon_ll_set_wifi_icg_bitmap(hal->syscon_dev, bitmap); in modem_clock_hal_set_clock_domain_icg_bitmap()
37 modem_syscon_ll_set_bt_icg_bitmap(hal->syscon_dev, bitmap); in modem_clock_hal_set_clock_domain_icg_bitmap()
[all …]
Dpmu_hal.c7 // The HAL layer for PMU (ESP32-C6 specific part)
11 #include "hal/pmu_hal.h"
12 #include "hal/pmu_types.h"
14 void pmu_hal_hp_set_digital_power_up_wait_cycle(pmu_hal_context_t *hal, uint32_t power_supply_wait_… in pmu_hal_hp_set_digital_power_up_wait_cycle() argument
16 pmu_ll_hp_set_digital_power_supply_wait_cycle(hal->dev, power_supply_wait_cycle); in pmu_hal_hp_set_digital_power_up_wait_cycle()
17 pmu_ll_hp_set_digital_power_up_wait_cycle(hal->dev, power_up_wait_cycle); in pmu_hal_hp_set_digital_power_up_wait_cycle()
20 uint32_t pmu_hal_hp_get_digital_power_up_wait_cycle(pmu_hal_context_t *hal) in pmu_hal_hp_get_digital_power_up_wait_cycle() argument
22 uint32_t power_supply_wait_cycle = pmu_ll_hp_get_digital_power_supply_wait_cycle(hal->dev); in pmu_hal_hp_get_digital_power_up_wait_cycle()
23 uint32_t power_up_wait_cycle = pmu_ll_hp_get_digital_power_up_wait_cycle(hal->dev); in pmu_hal_hp_get_digital_power_up_wait_cycle()
27 void pmu_hal_lp_set_digital_power_up_wait_cycle(pmu_hal_context_t *hal, uint32_t power_supply_wait_… in pmu_hal_lp_set_digital_power_up_wait_cycle() argument
[all …]
/hal_espressif-latest/components/esp_rom/patches/
Desp_rom_wdt.c12 #include "hal/wdt_types.h"
13 #include "hal/wdt_hal.h"
14 #include "hal/mwdt_ll.h"
19 void wdt_hal_init(wdt_hal_context_t *hal, wdt_inst_t wdt_inst, uint32_t prescaler, bool enable_intr) in wdt_hal_init() argument
21 //Initialize HAL context in wdt_hal_init()
22 memset(hal, 0, sizeof(wdt_hal_context_t)); in wdt_hal_init()
24 hal->mwdt_dev = &TIMERG0; in wdt_hal_init()
28 hal->mwdt_dev = &TIMERG1; in wdt_hal_init()
32 hal->rwdt_dev = RWDT_DEV_GET(); in wdt_hal_init()
34 hal->inst = wdt_inst; in wdt_hal_init()
[all …]
Desp_rom_systimer.c9 #include "hal/systimer_hal.h"
10 #include "hal/systimer_ll.h"
15 void systimer_hal_init(systimer_hal_context_t *hal) in systimer_hal_init() argument
17 hal->dev = &SYSTIMER; in systimer_hal_init()
18 systimer_ll_enable_clock(hal->dev, true); in systimer_hal_init()
21 void systimer_hal_deinit(systimer_hal_context_t *hal) in systimer_hal_deinit() argument
23 systimer_ll_enable_clock(hal->dev, false); in systimer_hal_deinit()
24 hal->dev = NULL; in systimer_hal_deinit()
27 void systimer_hal_set_tick_rate_ops(systimer_hal_context_t *hal, systimer_hal_tick_rate_ops_t *ops) in systimer_hal_set_tick_rate_ops() argument
29 hal->ticks_to_us = ops->ticks_to_us; in systimer_hal_set_tick_rate_ops()
[all …]
/hal_espressif-latest/components/driver/deprecated/
Dmcpwm_legacy.c16 #include "hal/mcpwm_hal.h"
17 #include "hal/gpio_hal.h"
18 #include "hal/mcpwm_ll.h"
73 …ESP_RETURN_ON_FALSE(context[mcpwm_num].hal.dev, ESP_ERR_INVALID_STATE, TAG, MCPWM_DRIVER_INIT_ERRO…
88 mcpwm_hal_context_t hal; member
100 .hal = {MCPWM_LL_GET_HW(0)},
106 .hal = {MCPWM_LL_GET_HW(1)},
193 …mcpwm_ll_timer_set_start_stop_command(context[mcpwm_num].hal.dev, timer_num, MCPWM_TIMER_START_NO_… in mcpwm_start()
203 …mcpwm_ll_timer_set_start_stop_command(context[mcpwm_num].hal.dev, timer_num, MCPWM_TIMER_STOP_EMPT… in mcpwm_stop()
226 mcpwm_hal_context_t *hal = &context[mcpwm_num].hal; in mcpwm_group_set_resolution() local
[all …]
/hal_espressif-latest/components/hal/esp32s2/
Dcp_dma_hal.c8 #include "hal/cp_dma_hal.h"
9 #include "hal/cp_dma_ll.h"
11 void cp_dma_hal_init(cp_dma_hal_context_t *hal, const cp_dma_hal_config_t *config) in cp_dma_hal_init() argument
13 hal->dev = &CP_DMA; in cp_dma_hal_init()
14 cp_dma_ll_enable_clock(hal->dev, true); in cp_dma_hal_init()
15 cp_dma_ll_reset_in_link(hal->dev); in cp_dma_hal_init()
16 cp_dma_ll_reset_out_link(hal->dev); in cp_dma_hal_init()
17 cp_dma_ll_reset_cmd_fifo(hal->dev); in cp_dma_hal_init()
18 cp_dma_ll_reset_fifo(hal->dev); in cp_dma_hal_init()
19 cp_dma_ll_enable_intr(hal->dev, UINT32_MAX, false); in cp_dma_hal_init()
[all …]

12345678910>>...34