pub fn set_stage_action(&mut self, stage: RwdtStage, action: RwdtStageAction) {
        let rtc_cntl = LP_WDT::regs();

        self.set_write_protection(false);

        match stage {
            RwdtStage::Stage0 => rtc_cntl
                .wdtconfig0()
                .modify(|_, w| unsafe { w.wdt_stg0().bits(action as u8) }),
            RwdtStage::Stage1 => rtc_cntl
                .wdtconfig0()
                .modify(|_, w| unsafe { w.wdt_stg1().bits(action as u8) }),
            RwdtStage::Stage2 => rtc_cntl
                .wdtconfig0()
                .modify(|_, w| unsafe { w.wdt_stg2().bits(action as u8) }),
            RwdtStage::Stage3 => rtc_cntl
                .wdtconfig0()
                .modify(|_, w| unsafe { w.wdt_stg3().bits(action as u8) }),
        };

        self.set_write_protection(true);
    }
Set the action for a specific stage.
esp-hal/src/rtc_cntl/mod.rs