pub(crate) fn disable_peripherals() {
    // Take the critical section up front to avoid taking it multiple times.
    critical_section::with(|cs| {
        for p in Peripheral::ALL {
            if Peripheral::KEEP_ENABLED.contains(p) {
                continue;
            }
            PeripheralClockControl::enable_forced_with_cs(*p, false, true, cs);
        }
    })
}
Disable all peripherals.

Peripherals listed in [KEEP_ENABLED] are NOT disabled.
esp-hal/src/system.rs