efm32tg11b_pac/efm32tg11b120/adc0/
aportmasterdis.rs

1#[doc = "Register `APORTMASTERDIS` reader"]
2pub struct R(crate::R<APORTMASTERDIS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<APORTMASTERDIS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<APORTMASTERDIS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<APORTMASTERDIS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `APORTMASTERDIS` writer"]
17pub struct W(crate::W<APORTMASTERDIS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<APORTMASTERDIS_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<APORTMASTERDIS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<APORTMASTERDIS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `APORT1XMASTERDIS` reader - APORT1X Master Disable"]
38pub type APORT1XMASTERDIS_R = crate::BitReader<bool>;
39#[doc = "Field `APORT1XMASTERDIS` writer - APORT1X Master Disable"]
40pub type APORT1XMASTERDIS_W<'a, const O: u8> =
41    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
42#[doc = "Field `APORT1YMASTERDIS` reader - APORT1Y Master Disable"]
43pub type APORT1YMASTERDIS_R = crate::BitReader<bool>;
44#[doc = "Field `APORT1YMASTERDIS` writer - APORT1Y Master Disable"]
45pub type APORT1YMASTERDIS_W<'a, const O: u8> =
46    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
47#[doc = "Field `APORT2XMASTERDIS` reader - APORT2X Master Disable"]
48pub type APORT2XMASTERDIS_R = crate::BitReader<bool>;
49#[doc = "Field `APORT2XMASTERDIS` writer - APORT2X Master Disable"]
50pub type APORT2XMASTERDIS_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
52#[doc = "Field `APORT2YMASTERDIS` reader - APORT2Y Master Disable"]
53pub type APORT2YMASTERDIS_R = crate::BitReader<bool>;
54#[doc = "Field `APORT2YMASTERDIS` writer - APORT2Y Master Disable"]
55pub type APORT2YMASTERDIS_W<'a, const O: u8> =
56    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
57#[doc = "Field `APORT3XMASTERDIS` reader - APORT3X Master Disable"]
58pub type APORT3XMASTERDIS_R = crate::BitReader<bool>;
59#[doc = "Field `APORT3XMASTERDIS` writer - APORT3X Master Disable"]
60pub type APORT3XMASTERDIS_W<'a, const O: u8> =
61    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
62#[doc = "Field `APORT3YMASTERDIS` reader - APORT3Y Master Disable"]
63pub type APORT3YMASTERDIS_R = crate::BitReader<bool>;
64#[doc = "Field `APORT3YMASTERDIS` writer - APORT3Y Master Disable"]
65pub type APORT3YMASTERDIS_W<'a, const O: u8> =
66    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
67#[doc = "Field `APORT4XMASTERDIS` reader - APORT4X Master Disable"]
68pub type APORT4XMASTERDIS_R = crate::BitReader<bool>;
69#[doc = "Field `APORT4XMASTERDIS` writer - APORT4X Master Disable"]
70pub type APORT4XMASTERDIS_W<'a, const O: u8> =
71    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
72#[doc = "Field `APORT4YMASTERDIS` reader - APORT4Y Master Disable"]
73pub type APORT4YMASTERDIS_R = crate::BitReader<bool>;
74#[doc = "Field `APORT4YMASTERDIS` writer - APORT4Y Master Disable"]
75pub type APORT4YMASTERDIS_W<'a, const O: u8> =
76    crate::BitWriter<'a, u32, APORTMASTERDIS_SPEC, bool, O>;
77impl R {
78    #[doc = "Bit 2 - APORT1X Master Disable"]
79    #[inline(always)]
80    pub fn aport1xmasterdis(&self) -> APORT1XMASTERDIS_R {
81        APORT1XMASTERDIS_R::new(((self.bits >> 2) & 1) != 0)
82    }
83    #[doc = "Bit 3 - APORT1Y Master Disable"]
84    #[inline(always)]
85    pub fn aport1ymasterdis(&self) -> APORT1YMASTERDIS_R {
86        APORT1YMASTERDIS_R::new(((self.bits >> 3) & 1) != 0)
87    }
88    #[doc = "Bit 4 - APORT2X Master Disable"]
89    #[inline(always)]
90    pub fn aport2xmasterdis(&self) -> APORT2XMASTERDIS_R {
91        APORT2XMASTERDIS_R::new(((self.bits >> 4) & 1) != 0)
92    }
93    #[doc = "Bit 5 - APORT2Y Master Disable"]
94    #[inline(always)]
95    pub fn aport2ymasterdis(&self) -> APORT2YMASTERDIS_R {
96        APORT2YMASTERDIS_R::new(((self.bits >> 5) & 1) != 0)
97    }
98    #[doc = "Bit 6 - APORT3X Master Disable"]
99    #[inline(always)]
100    pub fn aport3xmasterdis(&self) -> APORT3XMASTERDIS_R {
101        APORT3XMASTERDIS_R::new(((self.bits >> 6) & 1) != 0)
102    }
103    #[doc = "Bit 7 - APORT3Y Master Disable"]
104    #[inline(always)]
105    pub fn aport3ymasterdis(&self) -> APORT3YMASTERDIS_R {
106        APORT3YMASTERDIS_R::new(((self.bits >> 7) & 1) != 0)
107    }
108    #[doc = "Bit 8 - APORT4X Master Disable"]
109    #[inline(always)]
110    pub fn aport4xmasterdis(&self) -> APORT4XMASTERDIS_R {
111        APORT4XMASTERDIS_R::new(((self.bits >> 8) & 1) != 0)
112    }
113    #[doc = "Bit 9 - APORT4Y Master Disable"]
114    #[inline(always)]
115    pub fn aport4ymasterdis(&self) -> APORT4YMASTERDIS_R {
116        APORT4YMASTERDIS_R::new(((self.bits >> 9) & 1) != 0)
117    }
118}
119impl W {
120    #[doc = "Bit 2 - APORT1X Master Disable"]
121    #[inline(always)]
122    #[must_use]
123    pub fn aport1xmasterdis(&mut self) -> APORT1XMASTERDIS_W<2> {
124        APORT1XMASTERDIS_W::new(self)
125    }
126    #[doc = "Bit 3 - APORT1Y Master Disable"]
127    #[inline(always)]
128    #[must_use]
129    pub fn aport1ymasterdis(&mut self) -> APORT1YMASTERDIS_W<3> {
130        APORT1YMASTERDIS_W::new(self)
131    }
132    #[doc = "Bit 4 - APORT2X Master Disable"]
133    #[inline(always)]
134    #[must_use]
135    pub fn aport2xmasterdis(&mut self) -> APORT2XMASTERDIS_W<4> {
136        APORT2XMASTERDIS_W::new(self)
137    }
138    #[doc = "Bit 5 - APORT2Y Master Disable"]
139    #[inline(always)]
140    #[must_use]
141    pub fn aport2ymasterdis(&mut self) -> APORT2YMASTERDIS_W<5> {
142        APORT2YMASTERDIS_W::new(self)
143    }
144    #[doc = "Bit 6 - APORT3X Master Disable"]
145    #[inline(always)]
146    #[must_use]
147    pub fn aport3xmasterdis(&mut self) -> APORT3XMASTERDIS_W<6> {
148        APORT3XMASTERDIS_W::new(self)
149    }
150    #[doc = "Bit 7 - APORT3Y Master Disable"]
151    #[inline(always)]
152    #[must_use]
153    pub fn aport3ymasterdis(&mut self) -> APORT3YMASTERDIS_W<7> {
154        APORT3YMASTERDIS_W::new(self)
155    }
156    #[doc = "Bit 8 - APORT4X Master Disable"]
157    #[inline(always)]
158    #[must_use]
159    pub fn aport4xmasterdis(&mut self) -> APORT4XMASTERDIS_W<8> {
160        APORT4XMASTERDIS_W::new(self)
161    }
162    #[doc = "Bit 9 - APORT4Y Master Disable"]
163    #[inline(always)]
164    #[must_use]
165    pub fn aport4ymasterdis(&mut self) -> APORT4YMASTERDIS_W<9> {
166        APORT4YMASTERDIS_W::new(self)
167    }
168    #[doc = "Writes raw bits to the register."]
169    #[inline(always)]
170    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
171        self.0.bits(bits);
172        self
173    }
174}
175#[doc = "APORT Bus Master Disable Register\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 [aportmasterdis](index.html) module"]
176pub struct APORTMASTERDIS_SPEC;
177impl crate::RegisterSpec for APORTMASTERDIS_SPEC {
178    type Ux = u32;
179}
180#[doc = "`read()` method returns [aportmasterdis::R](R) reader structure"]
181impl crate::Readable for APORTMASTERDIS_SPEC {
182    type Reader = R;
183}
184#[doc = "`write(|w| ..)` method takes [aportmasterdis::W](W) writer structure"]
185impl crate::Writable for APORTMASTERDIS_SPEC {
186    type Writer = W;
187    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
188    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
189}
190#[doc = "`reset()` method sets APORTMASTERDIS to value 0"]
191impl crate::Resettable for APORTMASTERDIS_SPEC {
192    const RESET_VALUE: Self::Ux = 0;
193}