esp-idf/components/soc/include/hal
xiongyu 61778d5b7c bugfix(i2s): fix adc output invert issue 2020-02-17 17:15:01 +08:00
..
adc_hal.h bugfix(i2s): fix adc output invert issue 2020-02-17 17:15:01 +08:00
adc_types.h
brownout_hal.h esp32, esp32s2beta: move brownout.c to esp_common 2020-01-23 13:44:19 +01:00
can_hal.h
can_types.h
dac_hal.h
dac_types.h global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
esp_flash_err.h
gpio_hal.h
gpio_types.h global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
hal_defs.h
i2c_hal.h
i2c_types.h docs: Resolve doxygen & Sphinx warnings 2020-02-07 16:37:45 +11:00
i2s_hal.h
i2s_types.h
ledc_hal.h
ledc_types.h
mcpwm_hal.h
mcpwm_types.h
pcnt_hal.h
pcnt_types.h
readme.md
rmt_hal.h
rmt_types.h
rtc_io_hal.h
rtc_io_types.h
sdio_slave_hal.h
sdio_slave_ll.h
sdio_slave_types.h
sigmadelta_hal.h
sigmadelta_types.h
spi_flash_hal.h
spi_flash_types.h soc: separate abstraction, description and implementation 2020-02-11 14:30:42 +05:00
spi_hal.h
spi_slave_hal.h
spi_types.h spi: support esp32s2 2020-01-26 17:24:12 +08:00
timer_hal.h
timer_types.h
touch_sensor_hal.h ci: solve public headers errors 2020-02-11 14:30:42 +05:00
touch_sensor_types.h docs: Resolve doxygen & Sphinx warnings 2020-02-07 16:37:45 +11:00
uart_hal.h
uart_types.h docs: Resolve doxygen & Sphinx warnings 2020-02-07 16:37:45 +11:00
usb_hal.h soc: add USB peripheral register definitions, hal level, reg map, etc 2020-02-10 08:33:39 +00:00

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.