1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#[doc = "Register `DSEQCTRL` reader"]
pub type R = crate::R<DSEQCTRL_SPEC>;
#[doc = "Register `DSEQCTRL` writer"]
pub type W = crate::W<DSEQCTRL_SPEC>;
#[doc = "Field `INPUTCTRL` reader - Input Control"]
pub type INPUTCTRL_R = crate::BitReader;
#[doc = "Field `INPUTCTRL` writer - Input Control"]
pub type INPUTCTRL_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `CTRLB` reader - Control B"]
pub type CTRLB_R = crate::BitReader;
#[doc = "Field `CTRLB` writer - Control B"]
pub type CTRLB_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `REFCTRL` reader - Reference Control"]
pub type REFCTRL_R = crate::BitReader;
#[doc = "Field `REFCTRL` writer - Reference Control"]
pub type REFCTRL_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `AVGCTRL` reader - Average Control"]
pub type AVGCTRL_R = crate::BitReader;
#[doc = "Field `AVGCTRL` writer - Average Control"]
pub type AVGCTRL_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `SAMPCTRL` reader - Sampling Time Control"]
pub type SAMPCTRL_R = crate::BitReader;
#[doc = "Field `SAMPCTRL` writer - Sampling Time Control"]
pub type SAMPCTRL_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `WINLT` reader - Window Monitor Lower Threshold"]
pub type WINLT_R = crate::BitReader;
#[doc = "Field `WINLT` writer - Window Monitor Lower Threshold"]
pub type WINLT_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `WINUT` reader - Window Monitor Upper Threshold"]
pub type WINUT_R = crate::BitReader;
#[doc = "Field `WINUT` writer - Window Monitor Upper Threshold"]
pub type WINUT_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `GAINCORR` reader - Gain Correction"]
pub type GAINCORR_R = crate::BitReader;
#[doc = "Field `GAINCORR` writer - Gain Correction"]
pub type GAINCORR_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `OFFSETCORR` reader - Offset Correction"]
pub type OFFSETCORR_R = crate::BitReader;
#[doc = "Field `OFFSETCORR` writer - Offset Correction"]
pub type OFFSETCORR_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
#[doc = "Field `AUTOSTART` reader - ADC Auto-Start Conversion"]
pub type AUTOSTART_R = crate::BitReader;
#[doc = "Field `AUTOSTART` writer - ADC Auto-Start Conversion"]
pub type AUTOSTART_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
impl R {
    #[doc = "Bit 0 - Input Control"]
    #[inline(always)]
    pub fn inputctrl(&self) -> INPUTCTRL_R {
        INPUTCTRL_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Control B"]
    #[inline(always)]
    pub fn ctrlb(&self) -> CTRLB_R {
        CTRLB_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Reference Control"]
    #[inline(always)]
    pub fn refctrl(&self) -> REFCTRL_R {
        REFCTRL_R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - Average Control"]
    #[inline(always)]
    pub fn avgctrl(&self) -> AVGCTRL_R {
        AVGCTRL_R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - Sampling Time Control"]
    #[inline(always)]
    pub fn sampctrl(&self) -> SAMPCTRL_R {
        SAMPCTRL_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Window Monitor Lower Threshold"]
    #[inline(always)]
    pub fn winlt(&self) -> WINLT_R {
        WINLT_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - Window Monitor Upper Threshold"]
    #[inline(always)]
    pub fn winut(&self) -> WINUT_R {
        WINUT_R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - Gain Correction"]
    #[inline(always)]
    pub fn gaincorr(&self) -> GAINCORR_R {
        GAINCORR_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - Offset Correction"]
    #[inline(always)]
    pub fn offsetcorr(&self) -> OFFSETCORR_R {
        OFFSETCORR_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 31 - ADC Auto-Start Conversion"]
    #[inline(always)]
    pub fn autostart(&self) -> AUTOSTART_R {
        AUTOSTART_R::new(((self.bits >> 31) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Input Control"]
    #[inline(always)]
    #[must_use]
    pub fn inputctrl(&mut self) -> INPUTCTRL_W<DSEQCTRL_SPEC, 0> {
        INPUTCTRL_W::new(self)
    }
    #[doc = "Bit 1 - Control B"]
    #[inline(always)]
    #[must_use]
    pub fn ctrlb(&mut self) -> CTRLB_W<DSEQCTRL_SPEC, 1> {
        CTRLB_W::new(self)
    }
    #[doc = "Bit 2 - Reference Control"]
    #[inline(always)]
    #[must_use]
    pub fn refctrl(&mut self) -> REFCTRL_W<DSEQCTRL_SPEC, 2> {
        REFCTRL_W::new(self)
    }
    #[doc = "Bit 3 - Average Control"]
    #[inline(always)]
    #[must_use]
    pub fn avgctrl(&mut self) -> AVGCTRL_W<DSEQCTRL_SPEC, 3> {
        AVGCTRL_W::new(self)
    }
    #[doc = "Bit 4 - Sampling Time Control"]
    #[inline(always)]
    #[must_use]
    pub fn sampctrl(&mut self) -> SAMPCTRL_W<DSEQCTRL_SPEC, 4> {
        SAMPCTRL_W::new(self)
    }
    #[doc = "Bit 5 - Window Monitor Lower Threshold"]
    #[inline(always)]
    #[must_use]
    pub fn winlt(&mut self) -> WINLT_W<DSEQCTRL_SPEC, 5> {
        WINLT_W::new(self)
    }
    #[doc = "Bit 6 - Window Monitor Upper Threshold"]
    #[inline(always)]
    #[must_use]
    pub fn winut(&mut self) -> WINUT_W<DSEQCTRL_SPEC, 6> {
        WINUT_W::new(self)
    }
    #[doc = "Bit 7 - Gain Correction"]
    #[inline(always)]
    #[must_use]
    pub fn gaincorr(&mut self) -> GAINCORR_W<DSEQCTRL_SPEC, 7> {
        GAINCORR_W::new(self)
    }
    #[doc = "Bit 8 - Offset Correction"]
    #[inline(always)]
    #[must_use]
    pub fn offsetcorr(&mut self) -> OFFSETCORR_W<DSEQCTRL_SPEC, 8> {
        OFFSETCORR_W::new(self)
    }
    #[doc = "Bit 31 - ADC Auto-Start Conversion"]
    #[inline(always)]
    #[must_use]
    pub fn autostart(&mut self) -> AUTOSTART_W<DSEQCTRL_SPEC, 31> {
        AUTOSTART_W::new(self)
    }
    #[doc = r" Writes raw bits to the register."]
    #[doc = r""]
    #[doc = r" # Safety"]
    #[doc = r""]
    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.bits = bits;
        self
    }
}
#[doc = "DMA Sequential Control\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dseqctrl::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 [`dseqctrl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct DSEQCTRL_SPEC;
impl crate::RegisterSpec for DSEQCTRL_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`dseqctrl::R`](R) reader structure"]
impl crate::Readable for DSEQCTRL_SPEC {}
#[doc = "`write(|w| ..)` method takes [`dseqctrl::W`](W) writer structure"]
impl crate::Writable for DSEQCTRL_SPEC {
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets DSEQCTRL to value 0"]
impl crate::Resettable for DSEQCTRL_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}