SalimTerryLi 72bb572df1 hal: avoid generate 8/16 bits intruction for register access пре 4 година
..
adc_hal.h f3705832fd Merge branch 'bugfix/add_adc-dma_for_esp32' into 'master' пре 5 година
adc_types.h d9cea5dfdb Docs: fix doxygen warnings пре 5 година
brownout_hal.h caef7ad9f2 esp32, esp32s2beta: move brownout.c to esp_common пре 6 година
cpu_hal.h 8b6c0947c7 soc: add hal api to set exception vector table base address пре 6 година
cpu_types.h c9a51bfbb2 soc: create abstraction for cpu related operations пре 6 година
dac_hal.h 847a697c93 Driver(dac): fix DAC-DMA driver and unit test пре 5 година
dac_types.h 847a697c93 Driver(dac): fix DAC-DMA driver and unit test пре 5 година
esp_flash_err.h 612db28b6f Fix error code collision and CI check пре 6 година
gpio_hal.h af4c455417 bugfix(gpio):fix esp32 s2 rtc io issue пре 6 година
gpio_types.h 27fa1dc0dd doc: add peripheral_types.h as API reference for peripheral docs пре 5 година
hal_defs.h 72bb572df1 hal: avoid generate 8/16 bits intruction for register access пре 4 година
i2c_hal.h aac935ec81 bugfix(i2c): fix I2C driver breaking change issue. пре 6 година
i2c_types.h 11fac8637a docs: Resolve doxygen & Sphinx warnings пре 6 година
i2s_hal.h 3fa779b463 driver(I2S): Fix I2S reset issue for release/v4.2 пре 5 година
i2s_types.h b35d9002f3 driver(I2S): Fix i2s_comm_format_t configuration parameter does not match the TRM bug. пре 5 година
ledc_hal.h 857dec108d feat(ledc): refactor ledc driver пре 6 година
ledc_types.h c7738f24fc Merge branch 'bugfix/ledc_driver_enums' into 'master' пре 6 година
mcpwm_hal.h 538540ce21 mcpwm: add HAL layer support пре 6 година
mcpwm_types.h 538540ce21 mcpwm: add HAL layer support пре 6 година
mpu_hal.h d46989efa3 soc: remove param checking in cpu related abstractions пре 6 година
mpu_types.h 5e9783f4a6 hal: include pcnt_caps.h пре 5 година
pcnt_hal.h b1a72866ca refactor(pcnt): add hal pcnt driver пре 6 година
pcnt_types.h 5e9783f4a6 hal: include pcnt_caps.h пре 5 година
readme.md 33db6d608e spi_slave: add HAL support пре 6 година
rmt_hal.h 0bf2906bc9 driver(RMT): Fix the breaking change issue of RMT driver introduced by refactoring. пре 5 година
rmt_types.h 4fc16e2374 rmt: prefix caps name with SOC_ пре 5 година
rtc_io_hal.h 0c2bf7c8bc rtcio: add hal for driver пре 6 година
rtc_io_types.h 0c2bf7c8bc rtcio: add hal for driver пре 6 година
sdio_slave_hal.h 0ec08ca21b sdio_slave: support HAL layer пре 6 година
sdio_slave_ll.h 0ec08ca21b sdio_slave: support HAL layer пре 6 година
sdio_slave_types.h 0ec08ca21b sdio_slave: support HAL layer пре 6 година
sigmadelta_hal.h e62b831867 refactor(sigmadelta): add hal sigmadelta driver пре 6 година
sigmadelta_types.h e62b831867 refactor(sigmadelta): add hal sigmadelta driver пре 6 година
soc_hal.h d46989efa3 soc: remove param checking in cpu related abstractions пре 6 година
spi_flash_hal.h e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation пре 6 година
spi_flash_types.h 1f2e2fe8af soc: separate abstraction, description and implementation пре 6 година
spi_hal.h 5e9783f4a6 hal: include pcnt_caps.h пре 5 година
spi_slave_hal.h 5c9dc44c49 spi: multichip support пре 6 година
spi_types.h 27fa1dc0dd doc: add peripheral_types.h as API reference for peripheral docs пре 5 година
systimer_hal.h 2d1885b906 systimer: add HAL layer пре 5 година
systimer_types.h 2d1885b906 systimer: add HAL layer пре 5 година
timer_hal.h 91e62f4e37 timer_group: update hal api && fix intr_enable пре 5 година
timer_types.h 91e62f4e37 timer_group: update hal api && fix intr_enable пре 5 година
touch_sensor_hal.h 340563f479 Driver(touch): fix touch sensor driver for esp32s2. пре 5 година
touch_sensor_types.h 9bc72d5732 driver(touch): fix touch sensor driver redundancy пре 5 година
twai_hal.h e6db25af9d TWAI: Add ESP32-S2 support пре 5 година
twai_types.h 7ca2688378 TWAI: Fix incorrect configuration initializers for low speed bit rates пре 4 година
uart_hal.h c8ef66abad driver(uart): fix uart module reset issue (release V4.2) пре 4 година
uart_types.h c07e4c775d driver(uart): fix uart_set_line_inverse breaking change issue пре 6 година
usb_hal.h 4e8b4b9e49 soc: add USB peripheral register definitions, hal level, reg map, etc пре 6 година
wdt_hal.h 91841a53ff WDT: Add LL and HAL for watchdog timers пре 5 година
wdt_types.h 91841a53ff WDT: Add LL and HAL for watchdog timers пре 5 година

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.