Li Hang Fan 2f2d2e776c MCPWM/deadtime: fix and sync preset deadtime modes with well-known definition (backport v4.1) 3 лет назад
..
adc_hal.h f49b192a5e refactor the adc driver 6 лет назад
adc_types.h f49b192a5e refactor the adc driver 6 лет назад
can_hal.h a049e02d96 can: Refactor CAN to use HAL and LowLevel layers 6 лет назад
can_types.h 5311a60af2 CAN: Simplify caps header 4 лет назад
dac_hal.h 4fc12259dd Driver(adc): Disable the synchronization operation function of ADC1 and DAC 5 лет назад
dac_types.h 03ac1aaafd dac: refactor driver add hal 6 лет назад
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 7d3d56ff9a doc: add peripheral_types.h as API reference for peripheral docs 5 лет назад
hal_defs.h 538540ce21 mcpwm: add HAL layer support 6 лет назад
i2c_hal.h aac935ec81 bugfix(i2c): fix I2C driver breaking change issue. 6 лет назад
i2c_types.h 28286183d1 feature(I2C): Add i2c hal support. 6 лет назад
i2s_hal.h 9f6f510ce2 driver(I2S): Fix I2S reset issue for release/v4.1 5 лет назад
i2s_types.h 8c76a3c10d refactor(i2s): add hal i2s driver 6 лет назад
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 2f2d2e776c MCPWM/deadtime: fix and sync preset deadtime modes with well-known definition (backport v4.1) 3 лет назад
pcnt_hal.h b1a72866ca refactor(pcnt): add hal pcnt driver 6 лет назад
pcnt_types.h b1a72866ca refactor(pcnt): add hal pcnt driver 6 лет назад
readme.md 33db6d608e spi_slave: add HAL support 6 лет назад
rmt_hal.h 353826cacc rmt: fix RMT data trancate issue 5 лет назад
rmt_types.h 8fd8695ea1 rmt: add HAL layer 6 лет назад
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 лет назад
spi_flash_hal.h e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation 6 лет назад
spi_flash_types.h e6ad330018 ble_mesh_wifi_coexist example: Disable Wi-Fi RX IRAM optimisation 6 лет назад
spi_hal.h 5c9dc44c49 spi: multichip support 6 лет назад
spi_slave_hal.h 5c9dc44c49 spi: multichip support 6 лет назад
spi_types.h 7d3d56ff9a doc: add peripheral_types.h as API reference for peripheral docs 5 лет назад
timer_hal.h 5b516b107a timer_group: update hal api && fix intr_enable 5 лет назад
timer_types.h 5b516b107a timer_group: update hal api && fix intr_enable 5 лет назад
touch_sensor_hal.h 3a468a1ffd Refactor the touch sensor driver 6 лет назад
touch_sensor_types.h 67a48580fa driver(touch): fix touch sensor driver redundancy 5 лет назад
uart_hal.h 538117a904 Bugfix/fix uart set rx timeout feature (backport v4.1) 4 лет назад
uart_types.h f27ae9b0e2 feature: Add uart hal support. 6 лет назад

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.