mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-30 05:40:39 +00:00
add Rtc::disable_rom_message_printing (#2280)
This commit is contained in:
parent
897a67808c
commit
f4540a5508
@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Introduce `DmaRxStreamBuf` (#2242)
|
||||
- Implement `embedded_hal_async::delay::DelayNs` for `TIMGx` timers (#2084)
|
||||
- Added `Efuse::read_bit` (#2259)
|
||||
- Added `Rtc::disable_rom_message_printing` (S3 and H2 only) (#2280)
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -392,6 +392,25 @@ impl<'d> Rtc<'d> {
|
||||
config.start_sleep(wakeup_triggers);
|
||||
config.finish_sleep();
|
||||
}
|
||||
|
||||
/// Temporarily disable log messages of the ROM bootloader.
|
||||
///
|
||||
/// If you need to permanently disable the ROM bootloader messages, you'll
|
||||
/// need to set the corresponding eFuse.
|
||||
#[cfg(any(esp32s3, esp32h2))]
|
||||
pub fn disable_rom_message_printing(&self) {
|
||||
// Corresponding documentation:
|
||||
// ESP32-S3: TRM v1.5 chapter 8.3
|
||||
// ESP32-H2: TRM v0.5 chapter 8.2.3
|
||||
|
||||
#[cfg(esp32s3)]
|
||||
let rtc_cntl = unsafe { &*LPWR::ptr() };
|
||||
#[cfg(esp32h2)]
|
||||
let rtc_cntl = unsafe { &*LP_AON::ptr() };
|
||||
rtc_cntl
|
||||
.store4()
|
||||
.modify(|r, w| unsafe { w.bits(r.bits() & 1) });
|
||||
}
|
||||
}
|
||||
impl<'d> crate::private::Sealed for Rtc<'d> {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user