Skip to content

Commit a5f929a

Browse files
authored
ESP32-S3: Add RtcI2c driver (#4016)
* ESP32-S3: Add RtcI2c driver * limit cfg * un-hide traits * fix macro and doc * Document driver * fix doc * Add HIL test * use builder lite for timings * no-const * review comments
1 parent 5e13146 commit a5f929a

File tree

6 files changed

+832
-0
lines changed

6 files changed

+832
-0
lines changed

esp-hal/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- Expose cache line configuration (#3946)
2626
- ESP32: Expose `psram_vaddr_mode` via `PsramConfig` (#3990)
2727
- ESP32-S3: Expose more `Camera` config options (#3996)
28+
- ESP32-S3: Add RtcI2c driver (#0000)
2829
- `ShaBackend, Sha<N>Context`: Work-queue based SHA driver (#4013)
2930
- I2S: `i2s::master::Config` with support for more TDM mode standards (#3985)
3031

esp-hal/src/gpio/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ pub enum RtcFunction {
357357
Rtc = 0,
358358
/// Digital mode.
359359
Digital = 1,
360+
/// RTC_I2C mode.
361+
#[cfg(soc_has_rtc_i2c)]
362+
I2c = 3,
360363
}
361364

362365
/// Trait implemented by RTC pins

esp-hal/src/i2c/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ pub mod master;
1414
crate::unstable_module! {
1515
pub mod lp_i2c;
1616
}
17+
18+
#[cfg(esp32s3)] // Only support ESP32-S3 for now.
19+
#[cfg(soc_has_rtc_i2c)]
20+
crate::unstable_module! {
21+
pub mod rtc;
22+
}

0 commit comments

Comments
 (0)