|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| esp32/ | | 11-Mar-2024 | - | 13,519 | 6,452 |
| esp32c3/ | | 11-Mar-2024 | - | 12,625 | 6,102 |
| esp32s2/ | | 11-Mar-2024 | - | 18,672 | 9,051 |
| esp32s3/ | | 11-Mar-2024 | - | 15,900 | 7,349 |
| include/hal/ | | 11-Mar-2024 | - | 11,614 | 3,779 |
| test/ | | 11-Mar-2024 | - | 59 | 35 |
| CMakeLists.txt | D | 11-Mar-2024 | 3.3 KiB | 104 | 96 |
| README.md | D | 11-Mar-2024 | 2 KiB | 19 | 11 |
| adc_hal.c | D | 11-Mar-2024 | 12.8 KiB | 400 | 297 |
| aes_hal.c | D | 11-Mar-2024 | 3 KiB | 135 | 80 |
| component.mk | D | 11-Mar-2024 | 397 | 14 | 10 |
| cpu_hal.c | D | 11-Mar-2024 | 1.6 KiB | 65 | 39 |
| dac_hal.c | D | 11-Mar-2024 | 922 | 25 | 9 |
| ds_hal.c | D | 11-Mar-2024 | 1.8 KiB | 76 | 49 |
| gdma_hal.c | D | 11-Mar-2024 | 769 | 22 | 6 |
| gpio_hal.c | D | 11-Mar-2024 | 1.3 KiB | 40 | 21 |
| i2c_hal.c | D | 11-Mar-2024 | 6 KiB | 226 | 167 |
| i2c_hal_iram.c | D | 11-Mar-2024 | 1.6 KiB | 45 | 27 |
| i2s_hal.c | D | 11-Mar-2024 | 8.7 KiB | 275 | 215 |
| interrupt_controller_hal.c | D | 11-Mar-2024 | 2.3 KiB | 74 | 48 |
| ledc_hal.c | D | 11-Mar-2024 | 2.3 KiB | 62 | 40 |
| ledc_hal_iram.c | D | 11-Mar-2024 | 2.4 KiB | 65 | 38 |
| linker.lf | D | 11-Mar-2024 | 611 | 24 | 23 |
| mcpwm_hal.c | D | 11-Mar-2024 | 9.9 KiB | 231 | 187 |
| mpu_hal.c | D | 11-Mar-2024 | 1.5 KiB | 58 | 38 |
| pcnt_hal.c | D | 11-Mar-2024 | 819 | 24 | 5 |
| rmt_hal.c | D | 11-Mar-2024 | 3.4 KiB | 88 | 66 |
| rtc_io_hal.c | D | 11-Mar-2024 | 3.2 KiB | 98 | 76 |
| sdio_slave_hal.c | D | 11-Mar-2024 | 24.9 KiB | 728 | 536 |
| sha_hal.c | D | 11-Mar-2024 | 3.9 KiB | 161 | 108 |
| sigmadelta_hal.c | D | 11-Mar-2024 | 940 | 27 | 8 |
| soc_hal.c | D | 11-Mar-2024 | 998 | 37 | 18 |
| spi_flash_hal.c | D | 11-Mar-2024 | 4.2 KiB | 118 | 79 |
| spi_flash_hal_common.inc | D | 11-Mar-2024 | 7 KiB | 192 | 170 |
| spi_flash_hal_gpspi.c | D | 11-Mar-2024 | 1.5 KiB | 44 | 20 |
| spi_flash_hal_iram.c | D | 11-Mar-2024 | 6.7 KiB | 204 | 157 |
| spi_hal.c | D | 11-Mar-2024 | 6.8 KiB | 162 | 110 |
| spi_hal_iram.c | D | 11-Mar-2024 | 7.2 KiB | 207 | 139 |
| spi_slave_hal.c | D | 11-Mar-2024 | 2.3 KiB | 55 | 41 |
| spi_slave_hal_iram.c | D | 11-Mar-2024 | 4.1 KiB | 114 | 86 |
| spi_slave_hd_hal.c | D | 11-Mar-2024 | 15.7 KiB | 411 | 323 |
| timer_hal.c | D | 11-Mar-2024 | 1 KiB | 29 | 12 |
| touch_sensor_hal.c | D | 11-Mar-2024 | 1.7 KiB | 53 | 31 |
| twai_hal.c | D | 11-Mar-2024 | 3.6 KiB | 86 | 54 |
| twai_hal_iram.c | D | 11-Mar-2024 | 9.5 KiB | 205 | 152 |
| uart_hal.c | D | 11-Mar-2024 | 5.5 KiB | 186 | 134 |
| uart_hal_iram.c | D | 11-Mar-2024 | 1.5 KiB | 50 | 29 |
| wdt_hal_iram.c | D | 11-Mar-2024 | 6.7 KiB | 202 | 151 |
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.