|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| esp32/ | | 11-Mar-2024 | - | 13,697 | 6,816 |
| esp32c3/ | | 11-Mar-2024 | - | 13,261 | 6,611 |
| esp32h2/ | | 11-Mar-2024 | - | 12,626 | 6,172 |
| esp32s2/ | | 11-Mar-2024 | - | 16,601 | 7,994 |
| esp32s3/ | | 11-Mar-2024 | - | 17,765 | 9,044 |
| include/hal/ | | 11-Mar-2024 | - | 13,512 | 4,852 |
| platform_port/include/hal/ | | 11-Mar-2024 | - | 152 | 56 |
| test/ | | 11-Mar-2024 | - | 59 | 35 |
| CMakeLists.txt | D | 11-Mar-2024 | 3.9 KiB | 136 | 125 |
| Kconfig | D | 11-Mar-2024 | 1.4 KiB | 34 | 31 |
| README.md | D | 11-Mar-2024 | 2 KiB | 19 | 11 |
| adc_hal.c | D | 11-Mar-2024 | 23.9 KiB | 671 | 515 |
| aes_hal.c | D | 11-Mar-2024 | 3 KiB | 135 | 80 |
| component.mk | D | 11-Mar-2024 | 496 | 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.5 KiB | 64 | 39 |
| emac_hal.c | D | 11-Mar-2024 | 21.8 KiB | 522 | 340 |
| 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.1 KiB | 231 | 171 |
| i2c_hal_iram.c | D | 11-Mar-2024 | 1.8 KiB | 50 | 31 |
| i2s_hal.c | D | 11-Mar-2024 | 12.3 KiB | 367 | 280 |
| interrupt_controller_hal.c | D | 11-Mar-2024 | 2.3 KiB | 74 | 48 |
| lcd_hal.c | D | 11-Mar-2024 | 256 | 14 | 6 |
| 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 | 708 | 25 | 24 |
| mcpwm_hal.c | D | 11-Mar-2024 | 863 | 24 | 6 |
| mpu_hal.c | D | 11-Mar-2024 | 1.5 KiB | 58 | 38 |
| pcnt_hal.c | D | 11-Mar-2024 | 844 | 25 | 6 |
| rmt_hal.c | D | 11-Mar-2024 | 3.4 KiB | 89 | 67 |
| rtc_io_hal.c | D | 11-Mar-2024 | 3.2 KiB | 98 | 76 |
| sdio_slave_hal.c | D | 11-Mar-2024 | 25 KiB | 729 | 537 |
| 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_encrypt_hal_iram.c | D | 11-Mar-2024 | 1.8 KiB | 60 | 37 |
| spi_flash_hal.c | D | 11-Mar-2024 | 5.7 KiB | 160 | 110 |
| spi_flash_hal_common.inc | D | 11-Mar-2024 | 6.5 KiB | 185 | 163 |
| 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 | 163 | 111 |
| spi_hal_iram.c | D | 11-Mar-2024 | 7.5 KiB | 213 | 143 |
| spi_slave_hal.c | D | 11-Mar-2024 | 2.3 KiB | 55 | 41 |
| spi_slave_hal_iram.c | D | 11-Mar-2024 | 4.2 KiB | 117 | 88 |
| spi_slave_hd_hal.c | D | 11-Mar-2024 | 15.7 KiB | 411 | 323 |
| systimer_hal.c | D | 11-Mar-2024 | 7 KiB | 183 | 131 |
| timer_hal.c | D | 11-Mar-2024 | 1.3 KiB | 36 | 18 |
| 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.6 KiB | 191 | 138 |
| uart_hal_iram.c | D | 11-Mar-2024 | 1.5 KiB | 50 | 29 |
| usb_hal.c | D | 11-Mar-2024 | 829 | 27 | 10 |
| usb_phy_hal.c | D | 11-Mar-2024 | 1.9 KiB | 64 | 43 |
| usbh_hal.c | D | 11-Mar-2024 | 17.9 KiB | 407 | 262 |
| wdt_hal_iram.c | D | 11-Mar-2024 | 6.7 KiB | 202 | 151 |
| xt_wdt_hal.c | D | 11-Mar-2024 | 2.3 KiB | 79 | 42 |
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.