bl702_pac/aon/
gpadc_reg_scn_neg2.rs

1#[doc = "Register `gpadc_reg_scn_neg2` reader"]
2pub struct R(crate::R<GPADC_REG_SCN_NEG2_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GPADC_REG_SCN_NEG2_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GPADC_REG_SCN_NEG2_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GPADC_REG_SCN_NEG2_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `gpadc_reg_scn_neg2` writer"]
17pub struct W(crate::W<GPADC_REG_SCN_NEG2_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GPADC_REG_SCN_NEG2_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<GPADC_REG_SCN_NEG2_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GPADC_REG_SCN_NEG2_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `gpadc_scan_neg_6` reader - "]
38pub type GPADC_SCAN_NEG_6_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `gpadc_scan_neg_6` writer - "]
40pub type GPADC_SCAN_NEG_6_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>;
42#[doc = "Field `gpadc_scan_neg_7` reader - "]
43pub type GPADC_SCAN_NEG_7_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `gpadc_scan_neg_7` writer - "]
45pub type GPADC_SCAN_NEG_7_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>;
47#[doc = "Field `gpadc_scan_neg_8` reader - "]
48pub type GPADC_SCAN_NEG_8_R = crate::FieldReader<u8, u8>;
49#[doc = "Field `gpadc_scan_neg_8` writer - "]
50pub type GPADC_SCAN_NEG_8_W<'a, const O: u8> =
51    crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>;
52#[doc = "Field `gpadc_scan_neg_9` reader - "]
53pub type GPADC_SCAN_NEG_9_R = crate::FieldReader<u8, u8>;
54#[doc = "Field `gpadc_scan_neg_9` writer - "]
55pub type GPADC_SCAN_NEG_9_W<'a, const O: u8> =
56    crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>;
57#[doc = "Field `gpadc_scan_neg_10` reader - "]
58pub type GPADC_SCAN_NEG_10_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `gpadc_scan_neg_10` writer - "]
60pub type GPADC_SCAN_NEG_10_W<'a, const O: u8> =
61    crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>;
62#[doc = "Field `gpadc_scan_neg_11` reader - "]
63pub type GPADC_SCAN_NEG_11_R = crate::FieldReader<u8, u8>;
64#[doc = "Field `gpadc_scan_neg_11` writer - "]
65pub type GPADC_SCAN_NEG_11_W<'a, const O: u8> =
66    crate::FieldWriter<'a, u32, GPADC_REG_SCN_NEG2_SPEC, u8, u8, 5, O>;
67impl R {
68    #[doc = "Bits 0:4"]
69    #[inline(always)]
70    pub fn gpadc_scan_neg_6(&self) -> GPADC_SCAN_NEG_6_R {
71        GPADC_SCAN_NEG_6_R::new((self.bits & 0x1f) as u8)
72    }
73    #[doc = "Bits 5:9"]
74    #[inline(always)]
75    pub fn gpadc_scan_neg_7(&self) -> GPADC_SCAN_NEG_7_R {
76        GPADC_SCAN_NEG_7_R::new(((self.bits >> 5) & 0x1f) as u8)
77    }
78    #[doc = "Bits 10:14"]
79    #[inline(always)]
80    pub fn gpadc_scan_neg_8(&self) -> GPADC_SCAN_NEG_8_R {
81        GPADC_SCAN_NEG_8_R::new(((self.bits >> 10) & 0x1f) as u8)
82    }
83    #[doc = "Bits 15:19"]
84    #[inline(always)]
85    pub fn gpadc_scan_neg_9(&self) -> GPADC_SCAN_NEG_9_R {
86        GPADC_SCAN_NEG_9_R::new(((self.bits >> 15) & 0x1f) as u8)
87    }
88    #[doc = "Bits 20:24"]
89    #[inline(always)]
90    pub fn gpadc_scan_neg_10(&self) -> GPADC_SCAN_NEG_10_R {
91        GPADC_SCAN_NEG_10_R::new(((self.bits >> 20) & 0x1f) as u8)
92    }
93    #[doc = "Bits 25:29"]
94    #[inline(always)]
95    pub fn gpadc_scan_neg_11(&self) -> GPADC_SCAN_NEG_11_R {
96        GPADC_SCAN_NEG_11_R::new(((self.bits >> 25) & 0x1f) as u8)
97    }
98}
99impl W {
100    #[doc = "Bits 0:4"]
101    #[inline(always)]
102    #[must_use]
103    pub fn gpadc_scan_neg_6(&mut self) -> GPADC_SCAN_NEG_6_W<0> {
104        GPADC_SCAN_NEG_6_W::new(self)
105    }
106    #[doc = "Bits 5:9"]
107    #[inline(always)]
108    #[must_use]
109    pub fn gpadc_scan_neg_7(&mut self) -> GPADC_SCAN_NEG_7_W<5> {
110        GPADC_SCAN_NEG_7_W::new(self)
111    }
112    #[doc = "Bits 10:14"]
113    #[inline(always)]
114    #[must_use]
115    pub fn gpadc_scan_neg_8(&mut self) -> GPADC_SCAN_NEG_8_W<10> {
116        GPADC_SCAN_NEG_8_W::new(self)
117    }
118    #[doc = "Bits 15:19"]
119    #[inline(always)]
120    #[must_use]
121    pub fn gpadc_scan_neg_9(&mut self) -> GPADC_SCAN_NEG_9_W<15> {
122        GPADC_SCAN_NEG_9_W::new(self)
123    }
124    #[doc = "Bits 20:24"]
125    #[inline(always)]
126    #[must_use]
127    pub fn gpadc_scan_neg_10(&mut self) -> GPADC_SCAN_NEG_10_W<20> {
128        GPADC_SCAN_NEG_10_W::new(self)
129    }
130    #[doc = "Bits 25:29"]
131    #[inline(always)]
132    #[must_use]
133    pub fn gpadc_scan_neg_11(&mut self) -> GPADC_SCAN_NEG_11_W<25> {
134        GPADC_SCAN_NEG_11_W::new(self)
135    }
136    #[doc = "Writes raw bits to the register."]
137    #[inline(always)]
138    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
139        self.0.bits(bits);
140        self
141    }
142}
143#[doc = "adc converation sequence 4\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 [gpadc_reg_scn_neg2](index.html) module"]
144pub struct GPADC_REG_SCN_NEG2_SPEC;
145impl crate::RegisterSpec for GPADC_REG_SCN_NEG2_SPEC {
146    type Ux = u32;
147}
148#[doc = "`read()` method returns [gpadc_reg_scn_neg2::R](R) reader structure"]
149impl crate::Readable for GPADC_REG_SCN_NEG2_SPEC {
150    type Reader = R;
151}
152#[doc = "`write(|w| ..)` method takes [gpadc_reg_scn_neg2::W](W) writer structure"]
153impl crate::Writable for GPADC_REG_SCN_NEG2_SPEC {
154    type Writer = W;
155    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
156    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
157}
158#[doc = "`reset()` method sets gpadc_reg_scn_neg2 to value 0"]
159impl crate::Resettable for GPADC_REG_SCN_NEG2_SPEC {
160    const RESET_VALUE: Self::Ux = 0;
161}