Ivan Grokhotkov e4d45608d3 soc: add ledc_caps.h, replace target-based ifdefs with caps-based hace 6 años
..
adc_hal.h f49b192a5e refactor the adc driver hace 6 años
adc_types.h f49b192a5e refactor the adc driver hace 6 años
dac_hal.h 03ac1aaafd dac: refactor driver add hal hace 6 años
dac_types.h 03ac1aaafd dac: refactor driver add hal hace 6 años
esp_flash_err.h 612db28b6f Fix error code collision and CI check hace 6 años
gpio_hal.h af4c455417 bugfix(gpio):fix esp32 s2 rtc io issue hace 6 años
gpio_types.h af4c455417 bugfix(gpio):fix esp32 s2 rtc io issue hace 6 años
hal_defs.h 538540ce21 mcpwm: add HAL layer support hace 6 años
i2c_hal.h aac935ec81 bugfix(i2c): fix I2C driver breaking change issue. hace 6 años
i2c_types.h 28286183d1 feature(I2C): Add i2c hal support. hace 6 años
i2s_hal.h 25c0752682 i2s: fix regression in retrieval of chip revision causing apll test to fail hace 6 años
i2s_types.h 8c76a3c10d refactor(i2s): add hal i2s driver hace 6 años
ledc_hal.h 857dec108d feat(ledc): refactor ledc driver hace 6 años
ledc_types.h e4d45608d3 soc: add ledc_caps.h, replace target-based ifdefs with caps-based hace 6 años
mcpwm_hal.h 538540ce21 mcpwm: add HAL layer support hace 6 años
mcpwm_types.h 538540ce21 mcpwm: add HAL layer support hace 6 años
pcnt_hal.h b1a72866ca refactor(pcnt): add hal pcnt driver hace 6 años
pcnt_types.h b1a72866ca refactor(pcnt): add hal pcnt driver hace 6 años
readme.md 33db6d608e spi_slave: add HAL support hace 6 años
rmt_hal.h 8fd8695ea1 rmt: add HAL layer hace 6 años
rmt_types.h 8fd8695ea1 rmt: add HAL layer hace 6 años
rtc_io_hal.h 0c2bf7c8bc rtcio: add hal for driver hace 6 años
rtc_io_types.h 0c2bf7c8bc rtcio: add hal for driver hace 6 años
sdio_slave_hal.h 0ec08ca21b sdio_slave: support HAL layer hace 6 años
sdio_slave_ll.h 0ec08ca21b sdio_slave: support HAL layer hace 6 años
sdio_slave_types.h 0ec08ca21b sdio_slave: support HAL layer hace 6 años
sigmadelta_hal.h e62b831867 refactor(sigmadelta): add hal sigmadelta driver hace 6 años
sigmadelta_types.h e62b831867 refactor(sigmadelta): add hal sigmadelta driver hace 6 años
spi_flash_hal.h e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation hace 6 años
spi_flash_types.h e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation hace 6 años
spi_hal.h 5c9dc44c49 spi: multichip support hace 6 años
spi_slave_hal.h 5c9dc44c49 spi: multichip support hace 6 años
spi_types.h 24d26fccde Merge branch 'master' into feature/esp32s2beta_update hace 6 años
timer_hal.h bcfe684951 bugfix(timer): add a macro to control making the XTAL related functions hace 6 años
timer_types.h bcfe684951 bugfix(timer): add a macro to control making the XTAL related functions hace 6 años
touch_sensor_hal.h 3a468a1ffd Refactor the touch sensor driver hace 6 años
touch_sensor_types.h 3a468a1ffd Refactor the touch sensor driver hace 6 años
uart_hal.h eec8212237 add simplified API to set UART threshold values for RX FIFO full and TX FIFO empty hace 6 años
uart_types.h f27ae9b0e2 feature: Add uart hal support. hace 6 años

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.