/// The wakeup-enable mask survives a deep-sleep wake, so here it still holds the request of the run
/// that went to sleep. Two steps need the mask, in this order. First, the code releases the pads
/// that the previous run armed. Then it clears the mask, because a program starts with no wakeup
if super::reset_reason(crate::system::Cpu::ProCpu) == Some(super::SocResetReason::CoreDeepSleep)
/// source that it owns, and the hardware wakeup-enable mask keeps that request until the driver
/// clears it. The mask keeps it through a light sleep, and through a deep-sleep wake. A sleep call
/// A deadline in the past ends a light sleep immediately, and makes [`Self::sleep_deep`] panic.
/// rejection, the chip sleeps through the event that the caller wants to wake on. The return of
/// A wakeup source can also limit the length of the sleep. The chip wakes at the sooner of that
/// limit and the armed wakeup deadline. When the timer source is not enabled, the limit enables
/// is already due, or when the transition cannot catch it. The result is [`LightSleep::Ended`],
// https://github.com/espressif/esp-idf/blob/a45d713b03fd96d8805d1cc116f02a4415b360c7/components/esp_hw_support/sleep_modes.c#L2158
/// A stall is enough where the retention DMA saves the CPU domain, because the domain holds every
/// core and the hardware brings the stalled core back with this one. esp-idf stalls the other core
/// the same way and adds nothing more (`sleep_modes.c`, where the SMP retention work is gated on
/// handler that holds a cross-core lock, such as the clock tree, the peripheral reference counts,
/// or the UART locks that this path takes. This core then spins for that lock for ever, because the
/// Returns the cores that it stalled, as a bit for each [`Cpu`], for [`unpark_cores`]. A core that
/// A deep sleep powers the CPU down inside this loop, and a light sleep stops the CPU here until a
/// wakeup source ends the sleep. A rejected request does neither, so the reject interrupt is the
($id:literal, $inst:ident, $peri:ident, $rxd:ident, $txd:ident, $cts:ident, $rts:ident, wakeup_source = $_:literal) => {
($id:literal, $inst:ident, $peri:ident, $rxd:ident, $txd:ident, $cts:ident, $rts:ident, wakeup_source = $_:literal) => {