efm32pg12_pac/adc0/
aportmasterdis.rs

1#[doc = "Reader of register APORTMASTERDIS"]
2pub type R = crate::R<u32, super::APORTMASTERDIS>;
3#[doc = "Writer for register APORTMASTERDIS"]
4pub type W = crate::W<u32, super::APORTMASTERDIS>;
5#[doc = "Register APORTMASTERDIS `reset()`'s with value 0"]
6impl crate::ResetValue for super::APORTMASTERDIS {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `APORT1XMASTERDIS`"]
14pub type APORT1XMASTERDIS_R = crate::R<bool, bool>;
15#[doc = "Write proxy for field `APORT1XMASTERDIS`"]
16pub struct APORT1XMASTERDIS_W<'a> {
17    w: &'a mut W,
18}
19impl<'a> APORT1XMASTERDIS_W<'a> {
20    #[doc = r"Sets the field bit"]
21    #[inline(always)]
22    pub fn set_bit(self) -> &'a mut W {
23        self.bit(true)
24    }
25    #[doc = r"Clears the field bit"]
26    #[inline(always)]
27    pub fn clear_bit(self) -> &'a mut W {
28        self.bit(false)
29    }
30    #[doc = r"Writes raw bits to the field"]
31    #[inline(always)]
32    pub fn bit(self, value: bool) -> &'a mut W {
33        self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
34        self.w
35    }
36}
37#[doc = "Reader of field `APORT1YMASTERDIS`"]
38pub type APORT1YMASTERDIS_R = crate::R<bool, bool>;
39#[doc = "Write proxy for field `APORT1YMASTERDIS`"]
40pub struct APORT1YMASTERDIS_W<'a> {
41    w: &'a mut W,
42}
43impl<'a> APORT1YMASTERDIS_W<'a> {
44    #[doc = r"Sets the field bit"]
45    #[inline(always)]
46    pub fn set_bit(self) -> &'a mut W {
47        self.bit(true)
48    }
49    #[doc = r"Clears the field bit"]
50    #[inline(always)]
51    pub fn clear_bit(self) -> &'a mut W {
52        self.bit(false)
53    }
54    #[doc = r"Writes raw bits to the field"]
55    #[inline(always)]
56    pub fn bit(self, value: bool) -> &'a mut W {
57        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
58        self.w
59    }
60}
61#[doc = "Reader of field `APORT2XMASTERDIS`"]
62pub type APORT2XMASTERDIS_R = crate::R<bool, bool>;
63#[doc = "Write proxy for field `APORT2XMASTERDIS`"]
64pub struct APORT2XMASTERDIS_W<'a> {
65    w: &'a mut W,
66}
67impl<'a> APORT2XMASTERDIS_W<'a> {
68    #[doc = r"Sets the field bit"]
69    #[inline(always)]
70    pub fn set_bit(self) -> &'a mut W {
71        self.bit(true)
72    }
73    #[doc = r"Clears the field bit"]
74    #[inline(always)]
75    pub fn clear_bit(self) -> &'a mut W {
76        self.bit(false)
77    }
78    #[doc = r"Writes raw bits to the field"]
79    #[inline(always)]
80    pub fn bit(self, value: bool) -> &'a mut W {
81        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
82        self.w
83    }
84}
85#[doc = "Reader of field `APORT2YMASTERDIS`"]
86pub type APORT2YMASTERDIS_R = crate::R<bool, bool>;
87#[doc = "Write proxy for field `APORT2YMASTERDIS`"]
88pub struct APORT2YMASTERDIS_W<'a> {
89    w: &'a mut W,
90}
91impl<'a> APORT2YMASTERDIS_W<'a> {
92    #[doc = r"Sets the field bit"]
93    #[inline(always)]
94    pub fn set_bit(self) -> &'a mut W {
95        self.bit(true)
96    }
97    #[doc = r"Clears the field bit"]
98    #[inline(always)]
99    pub fn clear_bit(self) -> &'a mut W {
100        self.bit(false)
101    }
102    #[doc = r"Writes raw bits to the field"]
103    #[inline(always)]
104    pub fn bit(self, value: bool) -> &'a mut W {
105        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
106        self.w
107    }
108}
109#[doc = "Reader of field `APORT3XMASTERDIS`"]
110pub type APORT3XMASTERDIS_R = crate::R<bool, bool>;
111#[doc = "Write proxy for field `APORT3XMASTERDIS`"]
112pub struct APORT3XMASTERDIS_W<'a> {
113    w: &'a mut W,
114}
115impl<'a> APORT3XMASTERDIS_W<'a> {
116    #[doc = r"Sets the field bit"]
117    #[inline(always)]
118    pub fn set_bit(self) -> &'a mut W {
119        self.bit(true)
120    }
121    #[doc = r"Clears the field bit"]
122    #[inline(always)]
123    pub fn clear_bit(self) -> &'a mut W {
124        self.bit(false)
125    }
126    #[doc = r"Writes raw bits to the field"]
127    #[inline(always)]
128    pub fn bit(self, value: bool) -> &'a mut W {
129        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
130        self.w
131    }
132}
133#[doc = "Reader of field `APORT3YMASTERDIS`"]
134pub type APORT3YMASTERDIS_R = crate::R<bool, bool>;
135#[doc = "Write proxy for field `APORT3YMASTERDIS`"]
136pub struct APORT3YMASTERDIS_W<'a> {
137    w: &'a mut W,
138}
139impl<'a> APORT3YMASTERDIS_W<'a> {
140    #[doc = r"Sets the field bit"]
141    #[inline(always)]
142    pub fn set_bit(self) -> &'a mut W {
143        self.bit(true)
144    }
145    #[doc = r"Clears the field bit"]
146    #[inline(always)]
147    pub fn clear_bit(self) -> &'a mut W {
148        self.bit(false)
149    }
150    #[doc = r"Writes raw bits to the field"]
151    #[inline(always)]
152    pub fn bit(self, value: bool) -> &'a mut W {
153        self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
154        self.w
155    }
156}
157#[doc = "Reader of field `APORT4XMASTERDIS`"]
158pub type APORT4XMASTERDIS_R = crate::R<bool, bool>;
159#[doc = "Write proxy for field `APORT4XMASTERDIS`"]
160pub struct APORT4XMASTERDIS_W<'a> {
161    w: &'a mut W,
162}
163impl<'a> APORT4XMASTERDIS_W<'a> {
164    #[doc = r"Sets the field bit"]
165    #[inline(always)]
166    pub fn set_bit(self) -> &'a mut W {
167        self.bit(true)
168    }
169    #[doc = r"Clears the field bit"]
170    #[inline(always)]
171    pub fn clear_bit(self) -> &'a mut W {
172        self.bit(false)
173    }
174    #[doc = r"Writes raw bits to the field"]
175    #[inline(always)]
176    pub fn bit(self, value: bool) -> &'a mut W {
177        self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
178        self.w
179    }
180}
181#[doc = "Reader of field `APORT4YMASTERDIS`"]
182pub type APORT4YMASTERDIS_R = crate::R<bool, bool>;
183#[doc = "Write proxy for field `APORT4YMASTERDIS`"]
184pub struct APORT4YMASTERDIS_W<'a> {
185    w: &'a mut W,
186}
187impl<'a> APORT4YMASTERDIS_W<'a> {
188    #[doc = r"Sets the field bit"]
189    #[inline(always)]
190    pub fn set_bit(self) -> &'a mut W {
191        self.bit(true)
192    }
193    #[doc = r"Clears the field bit"]
194    #[inline(always)]
195    pub fn clear_bit(self) -> &'a mut W {
196        self.bit(false)
197    }
198    #[doc = r"Writes raw bits to the field"]
199    #[inline(always)]
200    pub fn bit(self, value: bool) -> &'a mut W {
201        self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
202        self.w
203    }
204}
205impl R {
206    #[doc = "Bit 2 - APORT1X Master Disable"]
207    #[inline(always)]
208    pub fn aport1xmasterdis(&self) -> APORT1XMASTERDIS_R {
209        APORT1XMASTERDIS_R::new(((self.bits >> 2) & 0x01) != 0)
210    }
211    #[doc = "Bit 3 - APORT1Y Master Disable"]
212    #[inline(always)]
213    pub fn aport1ymasterdis(&self) -> APORT1YMASTERDIS_R {
214        APORT1YMASTERDIS_R::new(((self.bits >> 3) & 0x01) != 0)
215    }
216    #[doc = "Bit 4 - APORT2X Master Disable"]
217    #[inline(always)]
218    pub fn aport2xmasterdis(&self) -> APORT2XMASTERDIS_R {
219        APORT2XMASTERDIS_R::new(((self.bits >> 4) & 0x01) != 0)
220    }
221    #[doc = "Bit 5 - APORT2Y Master Disable"]
222    #[inline(always)]
223    pub fn aport2ymasterdis(&self) -> APORT2YMASTERDIS_R {
224        APORT2YMASTERDIS_R::new(((self.bits >> 5) & 0x01) != 0)
225    }
226    #[doc = "Bit 6 - APORT3X Master Disable"]
227    #[inline(always)]
228    pub fn aport3xmasterdis(&self) -> APORT3XMASTERDIS_R {
229        APORT3XMASTERDIS_R::new(((self.bits >> 6) & 0x01) != 0)
230    }
231    #[doc = "Bit 7 - APORT3Y Master Disable"]
232    #[inline(always)]
233    pub fn aport3ymasterdis(&self) -> APORT3YMASTERDIS_R {
234        APORT3YMASTERDIS_R::new(((self.bits >> 7) & 0x01) != 0)
235    }
236    #[doc = "Bit 8 - APORT4X Master Disable"]
237    #[inline(always)]
238    pub fn aport4xmasterdis(&self) -> APORT4XMASTERDIS_R {
239        APORT4XMASTERDIS_R::new(((self.bits >> 8) & 0x01) != 0)
240    }
241    #[doc = "Bit 9 - APORT4Y Master Disable"]
242    #[inline(always)]
243    pub fn aport4ymasterdis(&self) -> APORT4YMASTERDIS_R {
244        APORT4YMASTERDIS_R::new(((self.bits >> 9) & 0x01) != 0)
245    }
246}
247impl W {
248    #[doc = "Bit 2 - APORT1X Master Disable"]
249    #[inline(always)]
250    pub fn aport1xmasterdis(&mut self) -> APORT1XMASTERDIS_W {
251        APORT1XMASTERDIS_W { w: self }
252    }
253    #[doc = "Bit 3 - APORT1Y Master Disable"]
254    #[inline(always)]
255    pub fn aport1ymasterdis(&mut self) -> APORT1YMASTERDIS_W {
256        APORT1YMASTERDIS_W { w: self }
257    }
258    #[doc = "Bit 4 - APORT2X Master Disable"]
259    #[inline(always)]
260    pub fn aport2xmasterdis(&mut self) -> APORT2XMASTERDIS_W {
261        APORT2XMASTERDIS_W { w: self }
262    }
263    #[doc = "Bit 5 - APORT2Y Master Disable"]
264    #[inline(always)]
265    pub fn aport2ymasterdis(&mut self) -> APORT2YMASTERDIS_W {
266        APORT2YMASTERDIS_W { w: self }
267    }
268    #[doc = "Bit 6 - APORT3X Master Disable"]
269    #[inline(always)]
270    pub fn aport3xmasterdis(&mut self) -> APORT3XMASTERDIS_W {
271        APORT3XMASTERDIS_W { w: self }
272    }
273    #[doc = "Bit 7 - APORT3Y Master Disable"]
274    #[inline(always)]
275    pub fn aport3ymasterdis(&mut self) -> APORT3YMASTERDIS_W {
276        APORT3YMASTERDIS_W { w: self }
277    }
278    #[doc = "Bit 8 - APORT4X Master Disable"]
279    #[inline(always)]
280    pub fn aport4xmasterdis(&mut self) -> APORT4XMASTERDIS_W {
281        APORT4XMASTERDIS_W { w: self }
282    }
283    #[doc = "Bit 9 - APORT4Y Master Disable"]
284    #[inline(always)]
285    pub fn aport4ymasterdis(&mut self) -> APORT4YMASTERDIS_W {
286        APORT4YMASTERDIS_W { w: self }
287    }
288}