atsamd11d/pm/
rcause.rs
1#[doc = "Register `RCAUSE` reader"]
2pub type R = crate::R<RcauseSpec>;
3#[doc = "Field `POR` reader - Power On Reset"]
4pub type PorR = crate::BitReader;
5#[doc = "Field `BOD12` reader - Brown Out 12 Detector Reset"]
6pub type Bod12R = crate::BitReader;
7#[doc = "Field `BOD33` reader - Brown Out 33 Detector Reset"]
8pub type Bod33R = crate::BitReader;
9#[doc = "Field `EXT` reader - External Reset"]
10pub type ExtR = crate::BitReader;
11#[doc = "Field `WDT` reader - Watchdog Reset"]
12pub type WdtR = crate::BitReader;
13#[doc = "Field `SYST` reader - System Reset Request"]
14pub type SystR = crate::BitReader;
15impl R {
16 #[doc = "Bit 0 - Power On Reset"]
17 #[inline(always)]
18 pub fn por(&self) -> PorR {
19 PorR::new((self.bits & 1) != 0)
20 }
21 #[doc = "Bit 1 - Brown Out 12 Detector Reset"]
22 #[inline(always)]
23 pub fn bod12(&self) -> Bod12R {
24 Bod12R::new(((self.bits >> 1) & 1) != 0)
25 }
26 #[doc = "Bit 2 - Brown Out 33 Detector Reset"]
27 #[inline(always)]
28 pub fn bod33(&self) -> Bod33R {
29 Bod33R::new(((self.bits >> 2) & 1) != 0)
30 }
31 #[doc = "Bit 4 - External Reset"]
32 #[inline(always)]
33 pub fn ext(&self) -> ExtR {
34 ExtR::new(((self.bits >> 4) & 1) != 0)
35 }
36 #[doc = "Bit 5 - Watchdog Reset"]
37 #[inline(always)]
38 pub fn wdt(&self) -> WdtR {
39 WdtR::new(((self.bits >> 5) & 1) != 0)
40 }
41 #[doc = "Bit 6 - System Reset Request"]
42 #[inline(always)]
43 pub fn syst(&self) -> SystR {
44 SystR::new(((self.bits >> 6) & 1) != 0)
45 }
46}
47#[doc = "Reset Cause\n\nYou can [`read`](crate::Reg::read) this register and get [`rcause::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
48pub struct RcauseSpec;
49impl crate::RegisterSpec for RcauseSpec {
50 type Ux = u8;
51}
52#[doc = "`read()` method returns [`rcause::R`](R) reader structure"]
53impl crate::Readable for RcauseSpec {}
54#[doc = "`reset()` method sets RCAUSE to value 0x01"]
55impl crate::Resettable for RcauseSpec {
56 const RESET_VALUE: u8 = 0x01;
57}