morris ca1b182b25 glitch_filter: support derive clock source form IO MUX 3 år sedan
..
adc_hal.h e27f3e3128 adc: support ADC on esp32c6 (hal) 3 år sedan
adc_hal_common.h 5b523a3313 esp_adc: new esp_adc component and adc drivers 3 år sedan
adc_oneshot_hal.h 5b523a3313 esp_adc: new esp_adc component and adc drivers 3 år sedan
adc_types.h 5333ac81bf adc: support ADC on esp32c6 (driver/test/example) 3 år sedan
adc_types_private.h ec812c1370 adc: add ADC target test for esp32c6 3 år sedan
aes_hal.h 51169b0e0c AES/SHA: use GDMA driver instead of LL 5 år sedan
aes_types.h 457ce080ae AES: refactor and add HAL layer 5 år sedan
brownout_hal.h 6a2d3509dc spi_flash: Making XMC flash works more stable when brownout detected 3 år sedan
cache_hal.h c1cbd7bbf6 cache/mmu: implememnt cache and mmu hal APIs in bootloader 4 år sedan
cache_types.h c1cbd7bbf6 cache/mmu: implememnt cache and mmu hal APIs in bootloader 4 år sedan
dac_types.h 8ef9fd4623 dac: optimize the dma stratege 3 år sedan
dma_types.h cd21058097 C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT 3 år sedan
ds_hal.h f80d6f8c21 Digital Signature support for S3 4 år sedan
ecc_hal.h bc1d35a14e esp32c2/hal: Added ECC HAL layer 4 år sedan
ecc_types.h bc1d35a14e esp32c2/hal: Added ECC HAL layer 4 år sedan
efuse_hal.h 0f8ff5aa15 efuse: Adds major and minor versions and others 3 år sedan
emac_hal.h 785f154f56 Merge branch 'feature/emac_buff' into 'master' 3 år sedan
esp_flash_err.h 5425ef4ee4 hal: extract hal component from soc component 5 år sedan
eth_types.h 8da2e4088c esp_eth: Update esp32's EMAC API to decouple driver and vendor config 4 år sedan
etm_hal.h fb26d0e11f etm: added etm channel allocator 3 år sedan
gdma_hal.h 83d16aa00c gdma: support IRAM interrupt 4 år sedan
gdma_types.h 356c6bb528 gdma: support etm extension 3 år sedan
glitch_filter_types.h ca1b182b25 glitch_filter: support derive clock source form IO MUX 3 år sedan
gpio_hal.h d0a7dc3e9f gpio: Fix IO hold function related problems 3 år sedan
gpio_types.h 6b1d4b4d49 ESP32-H2: Last MR for g0 component support, (only hal left) 3 år sedan
hmac_hal.h 1c233cc508 hmac_hal: Merge hmac hal layer for different into one 3 år sedan
i2c_hal.h 803fc3fbe0 I2C: Add i2c support for ESP32C6 3 år sedan
i2c_types.h 31b88a4c88 I2C: Refactor i2c hal and ll 3 år sedan
i2s_hal.h 039af72058 i2s: fixed typo 'philip' 3 år sedan
i2s_types.h fa9b022f68 i2s: support 4 line pdm rx on esp32s3 3 år sedan
lcd_hal.h 454d658309 rgb_lcd: workaround pclk polarity bug by setting mo>=2 3 år sedan
lcd_types.h fc1aa2848b rgb_lcd: support yuv converter 3 år sedan
ledc_hal.h 774197b7d3 ledc: Move ledc unit test to test_apps pytest framework 3 år sedan
ledc_types.h 9402ab427b ledc: Add basic support for esp32c6 3 år sedan
mcpwm_hal.h f7ff7ac4d0 mcpwm: clean up hal driver and add doc 3 år sedan
mcpwm_types.h c4e84751a5 driver: fix public header exceptions for driver 3 år sedan
memprot_types.h 7cb9304b65 Clean IRAM and DRAM address space conversion macros 3 år sedan
mmu_hal.h 6589daabb9 MMU: Add configurable mmu page size support on ESP32C2 3 år sedan
mmu_types.h 1d299a8976 esp32c6: add hal support 3 år sedan
modem_clock_types.h 63af1e9631 modem clock(driver): implemented the modem clock driver for esp32c6 3 år sedan
mpu_hal.h 66fb5a29bb Whitespace: Automated whitespace fixes (large commit) 5 år sedan
mpu_types.h 58c3f6a421 hal: explicitly include soc_caps.h 5 år sedan
pcnt_hal.h ec8defaa96 pulse_cnt: new driver for PCNT peripheral 4 år sedan
pcnt_types.h ec8defaa96 pulse_cnt: new driver for PCNT peripheral 4 år sedan
readme.md 5425ef4ee4 hal: extract hal component from soc component 5 år sedan
rmt_hal.h 2fb43820c2 driver_ng: implement new rmt driver 3 år sedan
rmt_types.h 4154eaec93 sdm: clean up soc/hal/ll code 3 år sedan
rtc_hal.h d0a7dc3e9f gpio: Fix IO hold function related problems 3 år sedan
rtc_io_hal.h 7a002ab7a6 rtcio: support rtcio on c6 3 år sedan
rtc_io_types.h 66fb5a29bb Whitespace: Automated whitespace fixes (large commit) 5 år sedan
sdio_slave_hal.h 507864c4f1 sdio_slave: allow disabling highspeed mode 3 år sedan
sdio_slave_ll.h 66fb5a29bb Whitespace: Automated whitespace fixes (large commit) 5 år sedan
sdio_slave_types.h 507864c4f1 sdio_slave: allow disabling highspeed mode 3 år sedan
sdm_hal.h 4154eaec93 sdm: clean up soc/hal/ll code 3 år sedan
sdm_types.h 4154eaec93 sdm: clean up soc/hal/ll code 3 år sedan
sha_hal.h 51169b0e0c AES/SHA: use GDMA driver instead of LL 5 år sedan
sha_types.h 6b1d4b4d49 ESP32-H2: Last MR for g0 component support, (only hal left) 3 år sedan
spi_flash_encrypt_hal.h 0d81edb174 spi_flash: refactoring flash encryption into new api 4 år sedan
spi_flash_hal.h cd21058097 C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT 3 år sedan
spi_flash_types.h 4418a855ba spi_flash: refactor the spi_flash clock configuration, and add support for esp32c2 3 år sedan
spi_hal.h 6a74cb695d spi: support spi on 8684 4 år sedan
spi_slave_hal.h ea0b839302 spi: limit esp32 dma workaround only on esp32 3 år sedan
spi_slave_hd_hal.h 346dea206e spi_slv_hd: add hal_trans_finish comments for clarifying risk 5 år sedan
spi_types.h 3610b14aef SPI : fix wrong dummy cycle on quad mode and put get-command function in spi_ll.h 3 år sedan
systimer_hal.h 63f852adc8 hal: Adds hal/ll func for SYSTIMER to select clock source: XTAL or RC_FAST_CLK 3 år sedan
systimer_types.h cd21058097 C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT 3 år sedan
temperature_sensor_types.h 4154eaec93 sdm: clean up soc/hal/ll code 3 år sedan
timer_hal.h a1030307f1 gptimer: bringup driver on esp32c6 3 år sedan
timer_types.h 00b6ec28b2 gptimer: support etm event and task 3 år sedan
touch_sensor_hal.h a5b09cf015 rtc_clk: Clean up some clock related enum and macro in soc/rtc.h, replace with new ones in 3 år sedan
touch_sensor_types.h 869bed1bb5 soc: don't expose unstable soc header files in public api 4 år sedan
twai_hal.h a25123f703 twai: bringup on esp32c6 3 år sedan
twai_types.h a25123f703 twai: bringup on esp32c6 3 år sedan
uart_hal.h 746f4b814c uart: move frequency of clock sources out of HAL 3 år sedan
uart_types.h 8138f8bb02 driver: remove deprecated code 3 år sedan
uhci_types.h c053ef0541 examples: added support of ESP32-S3 chip in controller_hci_uart example 4 år sedan
usb_dwc_hal.h d333833f59 usb_host: Rename struct/ll/hal symbols to use "usb_dwc" prefix 3 år sedan
usb_dwc_ll.h d333833f59 usb_host: Rename struct/ll/hal symbols to use "usb_dwc" prefix 3 år sedan
usb_hal.h 5425ef4ee4 hal: extract hal component from soc component 5 år sedan
usb_phy_hal.h 1fcd639224 usb: Add usb_phy driver to support operations on USB PHY 4 år sedan
usb_phy_types.h 1fcd639224 usb: Add usb_phy driver to support operations on USB PHY 4 år sedan
usb_types_private.h accbaee57c Add USB Host Library 4 år sedan
wdt_hal.h 6b1d4b4d49 ESP32-H2: Last MR for g0 component support, (only hal left) 3 år sedan
wdt_types.h 5425ef4ee4 hal: extract hal component from soc component 5 år sedan
xt_wdt_hal.h 4869b3cd4a WDT: Add support for XTAL32K Watchdog timer 4 år sedan

readme.md

HAL Layer Readme

The HAL layer is designed to be used by the drivers. We don't guarantee the stability and back-compatibility among versions. The HAL layer may update very frequently with the driver. Please don't use them in the applications or treat them as stable APIs.

The HAL layer consists of two layers: HAL (upper) and Lowlevel(bottom). The HAL layer defines the steps and data required by the peripheral. The lowlevel is a translation layer converting general conceptions to register configurations.

Lowlevel

This layer should be all static inline. The first argument of LL functions is usually a pointer to the beginning address of the peripheral register. Each chip should have its own LL layer. The functions in this layer should be atomic and independent from each other so that the upper layer can change/perform one of the options/operation without touching the others.

HAL

This layer should depend on the operating system as little as possible. It's a wrapping of LL functions, so that the upper layer can combine basic steps into different working ways (polling, non-polling, interrupt, etc.). Without using queues/locks/delay/loop/etc., this layer can be easily port to other os or simulation systems.

To get better performance and better porting ability, contexts are used to hold sustainable data and pass the parameters.

To develop your own driver, it is suggested to copy the HAL layer to your own code and keep them until manual update.