esp-idf/components/hal/include/hal
Ivan Grokhotkov 876f4d6a1c vfs: add support for semihosting on ESP32-C3 2022-01-14 17:29:03 +01:00
..
adc_hal.h adc: support adc dma driver on all chips 2021-12-16 00:19:15 +00:00
adc_types.h adc: support adc dma driver on all chips 2021-12-16 00:19:15 +00:00
aes_hal.h
aes_types.h
brownout_hal.h
cpu_hal.h vfs: add support for semihosting on ESP32-C3 2022-01-14 17:29:03 +01:00
cpu_types.h
dac_hal.h
dac_types.h
dma_types.h
ds_hal.h
emac_hal.h Fixed ESP32 EMAC driver `insufficient TX buffer size` which could followed esp_eth_stop and esp_eth_start sequence 2021-12-23 10:48:38 +01:00
esp_flash_err.h
eth_types.h
gdma_hal.h
gpio_hal.h soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00
gpio_types.h soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00
i2c_hal.h
i2c_types.h
i2s_hal.h
i2s_types.h apll: add lock for apll 2021-12-29 10:13:13 +08:00
interrupt_controller_hal.h
interrupt_controller_types.h
lcd_hal.h
lcd_types.h lcd: rgb pclk idle default to low 2021-11-30 13:44:06 +08:00
ledc_hal.h
ledc_types.h
mcpwm_hal.h
mcpwm_types.h
memprot_types.h System/Security: Memprot API unified (ESP32C3) 2021-12-21 01:50:36 +01:00
mpu_hal.h
mpu_types.h
pcnt_hal.h
pcnt_types.h
readme.md
rmt_hal.h rmt: move RMT item definition from soc to driver 2022-01-06 21:43:12 +08:00
rmt_types.h
rtc_hal.h soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00
rtc_io_hal.h
rtc_io_types.h
sdio_slave_hal.h
sdio_slave_ll.h
sdio_slave_types.h soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00
sha_hal.h
sha_types.h
sigmadelta_hal.h
sigmadelta_types.h soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00
soc_hal.h
spi_flash_encrypt_hal.h
spi_flash_hal.h
spi_flash_types.h
spi_hal.h spi: support spi on 8684 2022-01-12 11:30:29 +08:00
spi_slave_hal.h
spi_slave_hd_hal.h
spi_types.h spi: support spi on 8684 2022-01-12 11:30:29 +08:00
systimer_hal.h
systimer_types.h
timer_hal.h
timer_types.h timer: save alarm value in driver layer 2021-12-23 11:39:32 +08:00
touch_sensor_hal.h
touch_sensor_types.h soc: don't expose unstable soc header files in public api 2022-01-06 23:10:22 +08:00
twai_hal.h
twai_types.h
uart_hal.h
uart_types.h
uhci_types.h
usb_hal.h
usb_phy_hal.h
usb_phy_types.h
usb_types_private.h
usbh_hal.h usb: Hub Driver Update and Refactor 2022-01-06 15:11:13 +08:00
usbh_ll.h usb: USB Host stack uses USB PHY driver 2022-01-06 15:09:39 +08:00
wdt_hal.h
wdt_types.h
xt_wdt_hal.h

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.