change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER

This commit is contained in:
wuzhenghui
2026-01-31 22:31:34 +08:00
committed by morris
parent 12b9fb6549
commit 2d8c6ed6b4
88 changed files with 1117 additions and 941 deletions
+3 -10
View File
@@ -8,18 +8,11 @@
The `esp_hal_rtc_timer` component provides a **unified Hardware Abstraction Layer** for RTC Timer peripherals across all ESP-IDF supported targets. This HAL abstracts hardware differences between legacy RTC timer implementations (in RTC_CNTL peripheral) and modern low-power timer implementations, providing a consistent API for wakeup timer configuration and RTC time reading across different ESP chip families.
The component consolidates timer functionality from two different hardware implementations:
- **RTC_TIMER_LL_HARDWARE_V1**: Legacy RTC timer functionality in RTC_CNTL peripheral (ESP32, ESP32C2, ESP32C3, ESP32S2, ESP32S3)
- **RTC_TIMER_LL_HARDWARE_V2**: Newer LP timer peripheral
## Hardware Version Abstraction
The component uses hardware version macros defined in LL headers to automatically select the correct implementation:
- **RTC_TIMER_LL_HARDWARE_V1**: Defined in LL headers for legacy chips (ESP32, ESP32C2, ESP32C3, ESP32S2, ESP32S3)
- **RTC_TIMER_LL_HARDWARE_V2**: Defined in LL headers for modern chips (ESP32C5, ESP32C6, ESP32C61, ESP32H2, ESP32H21, ESP32H4, ESP32P4)
- **SOC_RTC_TIMER_V1_SUPPORTED**: Legacy RTC timer functionality in RTC_CNTL peripheral (ESP32, ESP32C2, ESP32C3, ESP32S2, ESP32S3)
- **SOC_RTC_TIMER_V2_SUPPORTED**: Newer LP timer peripheral (ESP32C5, ESP32C6, ESP32C61, ESP32H2, ESP32H21, ESP32H4, ESP32P4)
### Unified HAL API (All Chips)
- Wakeup timer configuration via `rtc_timer_hal_set_wakeup_timer()`
- Wakeup timer configuration via `rtc_timer_hal_set_wakeup_time()`
- RTC time reading via `rtc_timer_hal_get_cycle_count()`
### Hardware-Specific LL API