bl61x_pac/aon/
aon.rs

1#[doc = "Register `aon` reader"]
2pub type R = crate::R<AON_SPEC>;
3#[doc = "Register `aon` writer"]
4pub type W = crate::W<AON_SPEC>;
5#[doc = "Field `aon_resv` reader - "]
6pub type AON_RESV_R = crate::FieldReader;
7#[doc = "Field `aon_resv` writer - "]
8pub type AON_RESV_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `pu_aon_dc_tbuf` reader - "]
10pub type PU_AON_DC_TBUF_R = crate::BitReader;
11#[doc = "Field `pu_aon_dc_tbuf` writer - "]
12pub type PU_AON_DC_TBUF_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ldo11_rt_pulldown` reader - "]
14pub type LDO11_RT_PULLDOWN_R = crate::BitReader;
15#[doc = "Field `ldo11_rt_pulldown` writer - "]
16pub type LDO11_RT_PULLDOWN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `ldo11_rt_pulldown_sel` reader - "]
18pub type LDO11_RT_PULLDOWN_SEL_R = crate::BitReader;
19#[doc = "Field `ldo11_rt_pulldown_sel` writer - "]
20pub type LDO11_RT_PULLDOWN_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `sw_pu_ldo11_rt` reader - "]
22pub type SW_PU_LDO11_RT_R = crate::BitReader;
23#[doc = "Field `sw_pu_ldo11_rt` writer - "]
24pub type SW_PU_LDO11_RT_W<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26    #[doc = "Bits 0:7"]
27    #[inline(always)]
28    pub fn aon_resv(&self) -> AON_RESV_R {
29        AON_RESV_R::new((self.bits & 0xff) as u8)
30    }
31    #[doc = "Bit 12"]
32    #[inline(always)]
33    pub fn pu_aon_dc_tbuf(&self) -> PU_AON_DC_TBUF_R {
34        PU_AON_DC_TBUF_R::new(((self.bits >> 12) & 1) != 0)
35    }
36    #[doc = "Bit 20"]
37    #[inline(always)]
38    pub fn ldo11_rt_pulldown(&self) -> LDO11_RT_PULLDOWN_R {
39        LDO11_RT_PULLDOWN_R::new(((self.bits >> 20) & 1) != 0)
40    }
41    #[doc = "Bit 21"]
42    #[inline(always)]
43    pub fn ldo11_rt_pulldown_sel(&self) -> LDO11_RT_PULLDOWN_SEL_R {
44        LDO11_RT_PULLDOWN_SEL_R::new(((self.bits >> 21) & 1) != 0)
45    }
46    #[doc = "Bit 22"]
47    #[inline(always)]
48    pub fn sw_pu_ldo11_rt(&self) -> SW_PU_LDO11_RT_R {
49        SW_PU_LDO11_RT_R::new(((self.bits >> 22) & 1) != 0)
50    }
51}
52impl W {
53    #[doc = "Bits 0:7"]
54    #[inline(always)]
55    #[must_use]
56    pub fn aon_resv(&mut self) -> AON_RESV_W<AON_SPEC> {
57        AON_RESV_W::new(self, 0)
58    }
59    #[doc = "Bit 12"]
60    #[inline(always)]
61    #[must_use]
62    pub fn pu_aon_dc_tbuf(&mut self) -> PU_AON_DC_TBUF_W<AON_SPEC> {
63        PU_AON_DC_TBUF_W::new(self, 12)
64    }
65    #[doc = "Bit 20"]
66    #[inline(always)]
67    #[must_use]
68    pub fn ldo11_rt_pulldown(&mut self) -> LDO11_RT_PULLDOWN_W<AON_SPEC> {
69        LDO11_RT_PULLDOWN_W::new(self, 20)
70    }
71    #[doc = "Bit 21"]
72    #[inline(always)]
73    #[must_use]
74    pub fn ldo11_rt_pulldown_sel(&mut self) -> LDO11_RT_PULLDOWN_SEL_W<AON_SPEC> {
75        LDO11_RT_PULLDOWN_SEL_W::new(self, 21)
76    }
77    #[doc = "Bit 22"]
78    #[inline(always)]
79    #[must_use]
80    pub fn sw_pu_ldo11_rt(&mut self) -> SW_PU_LDO11_RT_W<AON_SPEC> {
81        SW_PU_LDO11_RT_W::new(self, 22)
82    }
83    #[doc = r" Writes raw bits to the register."]
84    #[doc = r""]
85    #[doc = r" # Safety"]
86    #[doc = r""]
87    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
88    #[inline(always)]
89    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
90        self.bits = bits;
91        self
92    }
93}
94#[doc = "aon.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`aon::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`aon::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
95pub struct AON_SPEC;
96impl crate::RegisterSpec for AON_SPEC {
97    type Ux = u32;
98}
99#[doc = "`read()` method returns [`aon::R`](R) reader structure"]
100impl crate::Readable for AON_SPEC {}
101#[doc = "`write(|w| ..)` method takes [`aon::W`](W) writer structure"]
102impl crate::Writable for AON_SPEC {
103    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
104    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
105}
106#[doc = "`reset()` method sets aon to value 0"]
107impl crate::Resettable for AON_SPEC {
108    const RESET_VALUE: Self::Ux = 0;
109}