bl602_pac/ef_ctrl/
ef_if_0_manual.rs

1#[doc = "Register `ef_if_0_manual` reader"]
2pub struct R(crate::R<EF_IF_0_MANUAL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<EF_IF_0_MANUAL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<EF_IF_0_MANUAL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<EF_IF_0_MANUAL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `ef_if_0_manual` writer"]
17pub struct W(crate::W<EF_IF_0_MANUAL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<EF_IF_0_MANUAL_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<EF_IF_0_MANUAL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<EF_IF_0_MANUAL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `ef_if_a` reader - "]
38pub type EF_IF_A_R = crate::FieldReader<u16, u16>;
39#[doc = "Field `ef_if_a` writer - "]
40pub type EF_IF_A_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, EF_IF_0_MANUAL_SPEC, u16, u16, 10, O>;
42#[doc = "Field `ef_if_pd` reader - "]
43pub type EF_IF_PD_R = crate::BitReader<bool>;
44#[doc = "Field `ef_if_pd` writer - "]
45pub type EF_IF_PD_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>;
46#[doc = "Field `ef_if_ps` reader - "]
47pub type EF_IF_PS_R = crate::BitReader<bool>;
48#[doc = "Field `ef_if_ps` writer - "]
49pub type EF_IF_PS_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>;
50#[doc = "Field `ef_if_strobe` reader - "]
51pub type EF_IF_STROBE_R = crate::BitReader<bool>;
52#[doc = "Field `ef_if_strobe` writer - "]
53pub type EF_IF_STROBE_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>;
54#[doc = "Field `ef_if_pgenb` reader - "]
55pub type EF_IF_PGENB_R = crate::BitReader<bool>;
56#[doc = "Field `ef_if_pgenb` writer - "]
57pub type EF_IF_PGENB_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>;
58#[doc = "Field `ef_if_load` reader - "]
59pub type EF_IF_LOAD_R = crate::BitReader<bool>;
60#[doc = "Field `ef_if_load` writer - "]
61pub type EF_IF_LOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>;
62#[doc = "Field `ef_if_csb` reader - "]
63pub type EF_IF_CSB_R = crate::BitReader<bool>;
64#[doc = "Field `ef_if_csb` writer - "]
65pub type EF_IF_CSB_W<'a, const O: u8> = crate::BitWriter<'a, u32, EF_IF_0_MANUAL_SPEC, bool, O>;
66#[doc = "Field `ef_if_0_q` reader - "]
67pub type EF_IF_0_Q_R = crate::FieldReader<u8, u8>;
68#[doc = "Field `ef_if_prot_code_manual` reader - "]
69pub type EF_IF_PROT_CODE_MANUAL_R = crate::FieldReader<u8, u8>;
70#[doc = "Field `ef_if_prot_code_manual` writer - "]
71pub type EF_IF_PROT_CODE_MANUAL_W<'a, const O: u8> =
72    crate::FieldWriter<'a, u32, EF_IF_0_MANUAL_SPEC, u8, u8, 8, O>;
73impl R {
74    #[doc = "Bits 0:9"]
75    #[inline(always)]
76    pub fn ef_if_a(&self) -> EF_IF_A_R {
77        EF_IF_A_R::new((self.bits & 0x03ff) as u16)
78    }
79    #[doc = "Bit 10"]
80    #[inline(always)]
81    pub fn ef_if_pd(&self) -> EF_IF_PD_R {
82        EF_IF_PD_R::new(((self.bits >> 10) & 1) != 0)
83    }
84    #[doc = "Bit 11"]
85    #[inline(always)]
86    pub fn ef_if_ps(&self) -> EF_IF_PS_R {
87        EF_IF_PS_R::new(((self.bits >> 11) & 1) != 0)
88    }
89    #[doc = "Bit 12"]
90    #[inline(always)]
91    pub fn ef_if_strobe(&self) -> EF_IF_STROBE_R {
92        EF_IF_STROBE_R::new(((self.bits >> 12) & 1) != 0)
93    }
94    #[doc = "Bit 13"]
95    #[inline(always)]
96    pub fn ef_if_pgenb(&self) -> EF_IF_PGENB_R {
97        EF_IF_PGENB_R::new(((self.bits >> 13) & 1) != 0)
98    }
99    #[doc = "Bit 14"]
100    #[inline(always)]
101    pub fn ef_if_load(&self) -> EF_IF_LOAD_R {
102        EF_IF_LOAD_R::new(((self.bits >> 14) & 1) != 0)
103    }
104    #[doc = "Bit 15"]
105    #[inline(always)]
106    pub fn ef_if_csb(&self) -> EF_IF_CSB_R {
107        EF_IF_CSB_R::new(((self.bits >> 15) & 1) != 0)
108    }
109    #[doc = "Bits 16:23"]
110    #[inline(always)]
111    pub fn ef_if_0_q(&self) -> EF_IF_0_Q_R {
112        EF_IF_0_Q_R::new(((self.bits >> 16) & 0xff) as u8)
113    }
114    #[doc = "Bits 24:31"]
115    #[inline(always)]
116    pub fn ef_if_prot_code_manual(&self) -> EF_IF_PROT_CODE_MANUAL_R {
117        EF_IF_PROT_CODE_MANUAL_R::new(((self.bits >> 24) & 0xff) as u8)
118    }
119}
120impl W {
121    #[doc = "Bits 0:9"]
122    #[inline(always)]
123    #[must_use]
124    pub fn ef_if_a(&mut self) -> EF_IF_A_W<0> {
125        EF_IF_A_W::new(self)
126    }
127    #[doc = "Bit 10"]
128    #[inline(always)]
129    #[must_use]
130    pub fn ef_if_pd(&mut self) -> EF_IF_PD_W<10> {
131        EF_IF_PD_W::new(self)
132    }
133    #[doc = "Bit 11"]
134    #[inline(always)]
135    #[must_use]
136    pub fn ef_if_ps(&mut self) -> EF_IF_PS_W<11> {
137        EF_IF_PS_W::new(self)
138    }
139    #[doc = "Bit 12"]
140    #[inline(always)]
141    #[must_use]
142    pub fn ef_if_strobe(&mut self) -> EF_IF_STROBE_W<12> {
143        EF_IF_STROBE_W::new(self)
144    }
145    #[doc = "Bit 13"]
146    #[inline(always)]
147    #[must_use]
148    pub fn ef_if_pgenb(&mut self) -> EF_IF_PGENB_W<13> {
149        EF_IF_PGENB_W::new(self)
150    }
151    #[doc = "Bit 14"]
152    #[inline(always)]
153    #[must_use]
154    pub fn ef_if_load(&mut self) -> EF_IF_LOAD_W<14> {
155        EF_IF_LOAD_W::new(self)
156    }
157    #[doc = "Bit 15"]
158    #[inline(always)]
159    #[must_use]
160    pub fn ef_if_csb(&mut self) -> EF_IF_CSB_W<15> {
161        EF_IF_CSB_W::new(self)
162    }
163    #[doc = "Bits 24:31"]
164    #[inline(always)]
165    #[must_use]
166    pub fn ef_if_prot_code_manual(&mut self) -> EF_IF_PROT_CODE_MANUAL_W<24> {
167        EF_IF_PROT_CODE_MANUAL_W::new(self)
168    }
169    #[doc = "Writes raw bits to the register."]
170    #[inline(always)]
171    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
172        self.0.bits(bits);
173        self
174    }
175}
176#[doc = "ef_if_0_manual.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ef_if_0_manual](index.html) module"]
177pub struct EF_IF_0_MANUAL_SPEC;
178impl crate::RegisterSpec for EF_IF_0_MANUAL_SPEC {
179    type Ux = u32;
180}
181#[doc = "`read()` method returns [ef_if_0_manual::R](R) reader structure"]
182impl crate::Readable for EF_IF_0_MANUAL_SPEC {
183    type Reader = R;
184}
185#[doc = "`write(|w| ..)` method takes [ef_if_0_manual::W](W) writer structure"]
186impl crate::Writable for EF_IF_0_MANUAL_SPEC {
187    type Writer = W;
188    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
189    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
190}
191#[doc = "`reset()` method sets ef_if_0_manual to value 0xe400"]
192impl crate::Resettable for EF_IF_0_MANUAL_SPEC {
193    const RESET_VALUE: Self::Ux = 0xe400;
194}