1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#[doc = "Register `RCAUSE` reader"]
pub struct R(crate::R<RCAUSE_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<RCAUSE_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<RCAUSE_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<RCAUSE_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Field `POR` reader - Power-on Reset"]
pub type POR_R = crate::BitReader<bool>;
#[doc = "Field `BOD` reader - Brown-out Reset"]
pub type BOD_R = crate::BitReader<bool>;
#[doc = "Field `EXT` reader - External Reset Pin"]
pub type EXT_R = crate::BitReader<bool>;
#[doc = "Field `WDT` reader - Watchdog Reset"]
pub type WDT_R = crate::BitReader<bool>;
#[doc = "Field `OCDRST` reader - OCD Reset"]
pub type OCDRST_R = crate::BitReader<bool>;
#[doc = "Field `POR33` reader - Power-on Reset"]
pub type POR33_R = crate::BitReader<bool>;
#[doc = "Field `BOD33` reader - Brown-out 3.3V Reset"]
pub type BOD33_R = crate::BitReader<bool>;
impl R {
    #[doc = "Bit 0 - Power-on Reset"]
    #[inline(always)]
    pub fn por(&self) -> POR_R {
        POR_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Brown-out Reset"]
    #[inline(always)]
    pub fn bod(&self) -> BOD_R {
        BOD_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - External Reset Pin"]
    #[inline(always)]
    pub fn ext(&self) -> EXT_R {
        EXT_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Watchdog Reset"]
    #[inline(always)]
    pub fn wdt(&self) -> WDT_R {
        WDT_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 8 - OCD Reset"]
    #[inline(always)]
    pub fn ocdrst(&self) -> OCDRST_R {
        OCDRST_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 10 - Power-on Reset"]
    #[inline(always)]
    pub fn por33(&self) -> POR33_R {
        POR33_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 13 - Brown-out 3.3V Reset"]
    #[inline(always)]
    pub fn bod33(&self) -> BOD33_R {
        BOD33_R::new(((self.bits >> 13) & 1) != 0)
    }
}
#[doc = "Reset Cause Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rcause](index.html) module"]
pub struct RCAUSE_SPEC;
impl crate::RegisterSpec for RCAUSE_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [rcause::R](R) reader structure"]
impl crate::Readable for RCAUSE_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets RCAUSE to value 0"]
impl crate::Resettable for RCAUSE_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}