• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

esp32/11-Mar-2024-13,5196,452

esp32c3/11-Mar-2024-12,6256,102

esp32s2/11-Mar-2024-18,6729,051

esp32s3/11-Mar-2024-15,9007,349

include/hal/11-Mar-2024-11,6143,779

test/11-Mar-2024-5935

CMakeLists.txtD11-Mar-20243.3 KiB10496

README.mdD11-Mar-20242 KiB1911

adc_hal.cD11-Mar-202412.8 KiB400297

aes_hal.cD11-Mar-20243 KiB13580

component.mkD11-Mar-2024397 1410

cpu_hal.cD11-Mar-20241.6 KiB6539

dac_hal.cD11-Mar-2024922 259

ds_hal.cD11-Mar-20241.8 KiB7649

gdma_hal.cD11-Mar-2024769 226

gpio_hal.cD11-Mar-20241.3 KiB4021

i2c_hal.cD11-Mar-20246 KiB226167

i2c_hal_iram.cD11-Mar-20241.6 KiB4527

i2s_hal.cD11-Mar-20248.7 KiB275215

interrupt_controller_hal.cD11-Mar-20242.3 KiB7448

ledc_hal.cD11-Mar-20242.3 KiB6240

ledc_hal_iram.cD11-Mar-20242.4 KiB6538

linker.lfD11-Mar-2024611 2423

mcpwm_hal.cD11-Mar-20249.9 KiB231187

mpu_hal.cD11-Mar-20241.5 KiB5838

pcnt_hal.cD11-Mar-2024819 245

rmt_hal.cD11-Mar-20243.4 KiB8866

rtc_io_hal.cD11-Mar-20243.2 KiB9876

sdio_slave_hal.cD11-Mar-202424.9 KiB728536

sha_hal.cD11-Mar-20243.9 KiB161108

sigmadelta_hal.cD11-Mar-2024940 278

soc_hal.cD11-Mar-2024998 3718

spi_flash_hal.cD11-Mar-20244.2 KiB11879

spi_flash_hal_common.incD11-Mar-20247 KiB192170

spi_flash_hal_gpspi.cD11-Mar-20241.5 KiB4420

spi_flash_hal_iram.cD11-Mar-20246.7 KiB204157

spi_hal.cD11-Mar-20246.8 KiB162110

spi_hal_iram.cD11-Mar-20247.2 KiB207139

spi_slave_hal.cD11-Mar-20242.3 KiB5541

spi_slave_hal_iram.cD11-Mar-20244.1 KiB11486

spi_slave_hd_hal.cD11-Mar-202415.7 KiB411323

timer_hal.cD11-Mar-20241 KiB2912

touch_sensor_hal.cD11-Mar-20241.7 KiB5331

twai_hal.cD11-Mar-20243.6 KiB8654

twai_hal_iram.cD11-Mar-20249.5 KiB205152

uart_hal.cD11-Mar-20245.5 KiB186134

uart_hal_iram.cD11-Mar-20241.5 KiB5029

wdt_hal_iram.cD11-Mar-20246.7 KiB202151

README.md

1## `hal`
2
3The `hal` component provides hardware abstraction and implementation for targets supported by ESP-IDF.
4
5#### `include/hal`
6
7`/include/hal` contains header files which provides a hardware-agnostic interface to the SoC. The interface consists of function declarations and abstracted types that other, higher level components can make use of in order to have code portable to all targets ESP-IDF supports.
8
9It contains an abstraction layer for ineracting with/driving the hardware found in the SoC such as the peripherals and 'core' hardware such as the CPU, MPU, caches, etc. It contains for the abstracted types.
10The abstraction design is actually two levels -- often somtimes `xxx_hal.h` includes a lower-level header from a `xxx_ll.h`,  which resides in the implementation. More on this abstraction design in the [`hal/include/hal`'s Readme](include/hal/readme.md)
11
12#### `target/include`
13
14Provides the implementation of the hardware-agnostic interface in the abstraction. Target-specific subdirectories exist for wildly different implementations among targets; while code that are common/very similar might be placed in the top-level of `/<target>/include`, using some amount of conditional preprocessors. It is up to the developers' discretion on which strategy to use. Code usually reside in source files with same names to header files whose interfaces they implement, ex. `xxx_hal.c` for `xxx_hal.h`.
15
16As mentioned previously, the lower-level abstraction header `xxx_ll.h` resides in this directory, since they contain hardware-specific details.
17However, what these can do is provide some abstraction among implementations, so that more code can be moved to the common, non-target-specific subdirectories.
18
19This can also contain target-specific extensions to the HAL headers. These target-specific HAL headers have the same name and include the abstraction layer HAL header via `include_next`. These extensions might add more function declarations or override some things using macro magic.