max78000_pac/pwrseq/
lppwst.rs

1#[doc = "Register `LPPWST` reader"]
2pub type R = crate::R<LppwstSpec>;
3#[doc = "Register `LPPWST` writer"]
4pub type W = crate::W<LppwstSpec>;
5#[doc = "Field `AINCOMP0` reader - Analog Input Comparator Wakeup Flag."]
6pub type Aincomp0R = crate::BitReader;
7#[doc = "Field `AINCOMP0` writer - Analog Input Comparator Wakeup Flag."]
8pub type Aincomp0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `BACKUP` reader - Backup Mode Wakeup Flag."]
10pub type BackupR = crate::BitReader;
11#[doc = "Field `BACKUP` writer - Backup Mode Wakeup Flag."]
12pub type BackupW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RESET` reader - Reset Detected Wakeup Flag."]
14pub type ResetR = crate::BitReader;
15#[doc = "Field `RESET` writer - Reset Detected Wakeup Flag."]
16pub type ResetW<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18    #[doc = "Bit 4 - Analog Input Comparator Wakeup Flag."]
19    #[inline(always)]
20    pub fn aincomp0(&self) -> Aincomp0R {
21        Aincomp0R::new(((self.bits >> 4) & 1) != 0)
22    }
23    #[doc = "Bit 16 - Backup Mode Wakeup Flag."]
24    #[inline(always)]
25    pub fn backup(&self) -> BackupR {
26        BackupR::new(((self.bits >> 16) & 1) != 0)
27    }
28    #[doc = "Bit 17 - Reset Detected Wakeup Flag."]
29    #[inline(always)]
30    pub fn reset(&self) -> ResetR {
31        ResetR::new(((self.bits >> 17) & 1) != 0)
32    }
33}
34impl W {
35    #[doc = "Bit 4 - Analog Input Comparator Wakeup Flag."]
36    #[inline(always)]
37    pub fn aincomp0(&mut self) -> Aincomp0W<LppwstSpec> {
38        Aincomp0W::new(self, 4)
39    }
40    #[doc = "Bit 16 - Backup Mode Wakeup Flag."]
41    #[inline(always)]
42    pub fn backup(&mut self) -> BackupW<LppwstSpec> {
43        BackupW::new(self, 16)
44    }
45    #[doc = "Bit 17 - Reset Detected Wakeup Flag."]
46    #[inline(always)]
47    pub fn reset(&mut self) -> ResetW<LppwstSpec> {
48        ResetW::new(self, 17)
49    }
50}
51#[doc = "Low Power Peripheral Wakeup Status Register.\n\nYou can [`read`](crate::Reg::read) this register and get [`lppwst::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`lppwst::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
52pub struct LppwstSpec;
53impl crate::RegisterSpec for LppwstSpec {
54    type Ux = u32;
55}
56#[doc = "`read()` method returns [`lppwst::R`](R) reader structure"]
57impl crate::Readable for LppwstSpec {}
58#[doc = "`write(|w| ..)` method takes [`lppwst::W`](W) writer structure"]
59impl crate::Writable for LppwstSpec {
60    type Safety = crate::Unsafe;
61    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
62    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
63}
64#[doc = "`reset()` method sets LPPWST to value 0"]
65impl crate::Resettable for LppwstSpec {
66    const RESET_VALUE: u32 = 0;
67}