esp-idf/components/hal/include/hal
Omar Chebib 622fb9e906 CI: check_public_headers script will detect the use of static asserts in headers
When a public header contains _Static_assert or static_assert, check_public_headers.py script will detect it and report it as an issue.
Indeed, public headers shall now use ESP_STATIC_ASSERT.
2022-12-06 19:28:51 +08:00
..
adc_hal.h adc: fix esp32s2 continuous mode converted bytes issue 2022-07-20 16:43:38 +08:00
adc_types.h Merge branch 'bugfix/multiple_adc_bugfix_v4.4' into 'release/v4.4' 2022-08-04 14:42:53 +08:00
aes_hal.h AES/SHA: use GDMA driver instead of LL 2021-01-19 11:02:51 +08:00
aes_types.h AES: refactor and add HAL layer 2020-12-10 09:04:47 +00:00
brownout_hal.h soc: combine xxx_caps.h into one soc_caps.h 2020-10-17 16:10:15 +08:00
cpu_hal.h vfs: add support for semihosting on ESP32-C3 2022-04-19 13:55:36 +00:00
cpu_types.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
dac_hal.h hal: added HAL_ASSERT 2021-06-22 11:28:01 +08:00
dac_types.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
dma_types.h C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT 2022-12-05 18:16:08 +08:00
ds_hal.h Digital Signature support for S3 2021-09-02 11:59:24 +05:30
emac_hal.h C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT 2022-12-05 18:16:08 +08:00
esp_flash_err.h hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00
eth_types.h esp_eth: Change clock mode setting 2021-07-08 14:27:31 +02:00
gdma_hal.h gdma: dynamic alloc DMA channels 2021-01-13 10:52:27 +08:00
gpio_hal.h esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep 2022-11-05 17:51:08 +08:00
gpio_types.h gpio: Fix some gpio pin num errors on esp32s2 and esp32c3 2021-12-30 12:27:14 +08:00
i2c_hal.h I2C: Make I2C clock frequency accurate 2022-08-29 09:07:30 +00:00
i2c_types.h i2c: removed unsupported features on different targets 2021-04-12 15:51:19 +08:00
i2s_hal.h i2s: fix PDM TX stereo mode for c3 and s3 2022-08-09 18:28:09 +08:00
i2s_types.h i2s: fix bug of switching mono/stereo mode by 'i2s_set_clk' on c3/s3 2022-03-03 03:23:41 +00:00
interrupt_controller_hal.h [hal]: cleaned up interrupt mask functions 2021-04-06 11:54:13 +08:00
interrupt_controller_types.h interrupt: added INTC FLEXIBLE capabillity to esp32c3 CPU caps 2021-01-05 15:39:46 +08:00
lcd_hal.h rgb_lcd: workaround pclk polarity bug by setting mo>=2 2022-09-27 13:22:18 +08:00
lcd_types.h rgb_lcd: added yuv converter LL driver 2022-09-27 13:42:56 +08:00
ledc_hal.h hal: update link to HAL readme.md 2020-09-11 15:48:08 +08:00
ledc_types.h LEDC: improved support for ESP32-C3 and refactored divisor calculation 2022-02-10 16:54:00 +08:00
mcpwm_hal.h mcpwm: refactor driver 2021-06-09 12:27:01 +08:00
mcpwm_types.h mcpwm: update hal and soc naming 2021-07-26 22:32:45 +08:00
memprot_types.h System/Security: Memprot API unified (ESP32C3,ESP32S3) 2022-01-27 12:40:27 +08:00
mpu_hal.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
mpu_types.h hal: explicitly include soc_caps.h 2021-01-07 10:13:17 +08:00
pcnt_hal.h pcnt: refactor hal driver 2021-08-10 17:19:21 +08:00
pcnt_types.h pcnt: refactor hal driver 2021-08-10 17:19:21 +08:00
readme.md hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00
rmt_hal.h rmt: distinguish group and channel in HAL layer 2021-02-25 12:42:23 +08:00
rmt_types.h rmt: restructure rmt_signal_conn_t 2021-06-22 15:29:11 +08:00
rtc_hal.h esp_hw_‎support/sleep: ‎fix cannot lightsleep again after a wakeup from ULP 2022-05-19 23:13:42 +08:00
rtc_io_hal.h esp32h2: update driver/hal/soc components to support esp32h2 2021-07-01 19:53:11 +08:00
rtc_io_types.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
sdio_slave_hal.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
sdio_slave_ll.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
sdio_slave_types.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
sha_hal.h AES/SHA: use GDMA driver instead of LL 2021-01-19 11:02:51 +08:00
sha_types.h esp32s2: move crypto related functions 2021-07-16 20:14:26 +08:00
sigmadelta_hal.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
sigmadelta_types.h sigma_delta: add periph signal list and support esp32-s3 2020-10-29 11:06:28 +08:00
soc_hal.h [freertos] Silence sign-conversion warning 2021-01-14 10:54:15 +11:00
spi_flash_encrypt_hal.h spi_flash: refactoring flash encryption into new api 2021-04-25 17:09:25 +08:00
spi_flash_hal.h CI: check_public_headers script will detect the use of static asserts in headers 2022-12-06 19:28:51 +08:00
spi_flash_types.h esp_flash: add opi flash support in esp_flash chip driver, for MXIC 2021-09-07 14:44:40 +08:00
spi_hal.h spi_master:support octal mode for esp32s2 and esp32s3 2021-08-19 16:40:22 +08:00
spi_slave_hal.h spi: remove HSPI macro on esp32c3 and esp32s3 2021-04-06 13:42:49 +08:00
spi_slave_hd_hal.h spi_slv_hd: add hal_trans_finish comments for clarifying risk 2021-02-24 12:01:31 +08:00
spi_types.h SPI: Fixed Quad SPI wrong dummy cycle issue on ESP32C3/ESP32S3 and put get-command/dummy-bits functions in spi_ll.h 2022-09-07 18:55:38 +08:00
systimer_hal.h systimer: strip hal driver 2021-04-22 21:08:39 +08:00
systimer_types.h C/Cxx: unify static assertions with the macro ESP_STATIC_ASSERT 2022-12-05 18:16:08 +08:00
timer_hal.h driver: fix timer driver initialization sequence to not trigger interrupt immediately 2021-09-16 19:45:33 +08:00
timer_types.h timergroup: move interrupt index into peripheral description file 2020-11-03 18:16:50 +08:00
touch_sensor_hal.h Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
touch_sensor_types.h touch sensor: update copyright notice 2021-10-08 11:45:57 +08:00
twai_hal.h TWAI: FIFO overrun handling and errata workarounds 2021-03-30 14:17:31 +08:00
twai_types.h TWAI: Fix incorrect configuration initializers for low speed bit rates 2021-07-19 14:27:39 +08:00
uart_hal.h add uart core reset in uart_module_enable() 2021-07-21 11:41:04 +08:00
uart_types.h uart: add uart support on esp32s3 2020-11-24 19:12:51 +08:00
uhci_types.h examples: added support of ESP32-S3 chip in controller_hci_uart example 2021-08-26 14:24:32 +08:00
usb_hal.h hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00
usb_phy_hal.h usb: Add usb_phy driver to support operations on USB PHY 2021-09-13 12:39:56 +08:00
usb_phy_types.h usb: Add usb_phy driver to support operations on USB PHY 2021-09-13 12:39:56 +08:00
usb_types_private.h Add USB Host Library 2021-08-24 23:28:00 +08:00
usbh_hal.h usb: Hub Driver Update and Refactor 2022-02-18 15:51:05 +08:00
usbh_ll.h usb: USB Host stack uses USB PHY driver 2022-02-18 15:51:05 +08:00
wdt_hal.h soc: combine xxx_caps.h into one soc_caps.h 2020-10-17 16:10:15 +08:00
wdt_types.h hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00
xt_wdt_hal.h WDT: Add support for XTAL32K Watchdog timer 2021-09-02 09:09:00 +08:00

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.