rp2040_pac/watchdog/
reason.rs

1#[doc = "Register `REASON` reader"]
2pub type R = crate::R<REASON_SPEC>;
3#[doc = "Field `TIMER` reader - "]
4pub type TIMER_R = crate::BitReader;
5#[doc = "Field `FORCE` reader - "]
6pub type FORCE_R = crate::BitReader;
7impl R {
8    #[doc = "Bit 0"]
9    #[inline(always)]
10    pub fn timer(&self) -> TIMER_R {
11        TIMER_R::new((self.bits & 1) != 0)
12    }
13    #[doc = "Bit 1"]
14    #[inline(always)]
15    pub fn force(&self) -> FORCE_R {
16        FORCE_R::new(((self.bits >> 1) & 1) != 0)
17    }
18}
19#[doc = "Logs the reason for the last reset. Both bits are zero for the case of a hardware reset.  
20
21You can [`read`](crate::generic::Reg::read) this register and get [`reason::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
22pub struct REASON_SPEC;
23impl crate::RegisterSpec for REASON_SPEC {
24    type Ux = u32;
25}
26#[doc = "`read()` method returns [`reason::R`](R) reader structure"]
27impl crate::Readable for REASON_SPEC {}
28#[doc = "`reset()` method sets REASON to value 0"]
29impl crate::Resettable for REASON_SPEC {
30    const RESET_VALUE: u32 = 0;
31}