efm32gg11b840_pac/prs/
swpulse.rs

1#[doc = "Register `SWPULSE` writer"]
2pub struct W(crate::W<SWPULSE_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<SWPULSE_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl core::ops::DerefMut for W {
11    #[inline(always)]
12    fn deref_mut(&mut self) -> &mut Self::Target {
13        &mut self.0
14    }
15}
16impl From<crate::W<SWPULSE_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<SWPULSE_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `CH0PULSE` writer - Channel 0 Pulse Generation"]
23pub type CH0PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 0>;
24#[doc = "Field `CH1PULSE` writer - Channel 1 Pulse Generation"]
25pub type CH1PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 1>;
26#[doc = "Field `CH2PULSE` writer - Channel 2 Pulse Generation"]
27pub type CH2PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 2>;
28#[doc = "Field `CH3PULSE` writer - Channel 3 Pulse Generation"]
29pub type CH3PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 3>;
30#[doc = "Field `CH4PULSE` writer - Channel 4 Pulse Generation"]
31pub type CH4PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 4>;
32#[doc = "Field `CH5PULSE` writer - Channel 5 Pulse Generation"]
33pub type CH5PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 5>;
34#[doc = "Field `CH6PULSE` writer - Channel 6 Pulse Generation"]
35pub type CH6PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 6>;
36#[doc = "Field `CH7PULSE` writer - Channel 7 Pulse Generation"]
37pub type CH7PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 7>;
38#[doc = "Field `CH8PULSE` writer - Channel 8 Pulse Generation"]
39pub type CH8PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 8>;
40#[doc = "Field `CH9PULSE` writer - Channel 9 Pulse Generation"]
41pub type CH9PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 9>;
42#[doc = "Field `CH10PULSE` writer - Channel 10 Pulse Generation"]
43pub type CH10PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 10>;
44#[doc = "Field `CH11PULSE` writer - Channel 11 Pulse Generation"]
45pub type CH11PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 11>;
46#[doc = "Field `CH12PULSE` writer - Channel 12 Pulse Generation"]
47pub type CH12PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 12>;
48#[doc = "Field `CH13PULSE` writer - Channel 13 Pulse Generation"]
49pub type CH13PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 13>;
50#[doc = "Field `CH14PULSE` writer - Channel 14 Pulse Generation"]
51pub type CH14PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 14>;
52#[doc = "Field `CH15PULSE` writer - Channel 15 Pulse Generation"]
53pub type CH15PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 15>;
54#[doc = "Field `CH16PULSE` writer - Channel 16 Pulse Generation"]
55pub type CH16PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 16>;
56#[doc = "Field `CH17PULSE` writer - Channel 17 Pulse Generation"]
57pub type CH17PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 17>;
58#[doc = "Field `CH18PULSE` writer - Channel 18 Pulse Generation"]
59pub type CH18PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 18>;
60#[doc = "Field `CH19PULSE` writer - Channel 19 Pulse Generation"]
61pub type CH19PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 19>;
62#[doc = "Field `CH20PULSE` writer - Channel 20 Pulse Generation"]
63pub type CH20PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 20>;
64#[doc = "Field `CH21PULSE` writer - Channel 21 Pulse Generation"]
65pub type CH21PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 21>;
66#[doc = "Field `CH22PULSE` writer - Channel 22 Pulse Generation"]
67pub type CH22PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 22>;
68#[doc = "Field `CH23PULSE` writer - Channel 23 Pulse Generation"]
69pub type CH23PULSE_W<'a> = crate::BitWriter<'a, u32, SWPULSE_SPEC, bool, 23>;
70impl W {
71    #[doc = "Bit 0 - Channel 0 Pulse Generation"]
72    #[inline(always)]
73    pub fn ch0pulse(&mut self) -> CH0PULSE_W {
74        CH0PULSE_W::new(self)
75    }
76    #[doc = "Bit 1 - Channel 1 Pulse Generation"]
77    #[inline(always)]
78    pub fn ch1pulse(&mut self) -> CH1PULSE_W {
79        CH1PULSE_W::new(self)
80    }
81    #[doc = "Bit 2 - Channel 2 Pulse Generation"]
82    #[inline(always)]
83    pub fn ch2pulse(&mut self) -> CH2PULSE_W {
84        CH2PULSE_W::new(self)
85    }
86    #[doc = "Bit 3 - Channel 3 Pulse Generation"]
87    #[inline(always)]
88    pub fn ch3pulse(&mut self) -> CH3PULSE_W {
89        CH3PULSE_W::new(self)
90    }
91    #[doc = "Bit 4 - Channel 4 Pulse Generation"]
92    #[inline(always)]
93    pub fn ch4pulse(&mut self) -> CH4PULSE_W {
94        CH4PULSE_W::new(self)
95    }
96    #[doc = "Bit 5 - Channel 5 Pulse Generation"]
97    #[inline(always)]
98    pub fn ch5pulse(&mut self) -> CH5PULSE_W {
99        CH5PULSE_W::new(self)
100    }
101    #[doc = "Bit 6 - Channel 6 Pulse Generation"]
102    #[inline(always)]
103    pub fn ch6pulse(&mut self) -> CH6PULSE_W {
104        CH6PULSE_W::new(self)
105    }
106    #[doc = "Bit 7 - Channel 7 Pulse Generation"]
107    #[inline(always)]
108    pub fn ch7pulse(&mut self) -> CH7PULSE_W {
109        CH7PULSE_W::new(self)
110    }
111    #[doc = "Bit 8 - Channel 8 Pulse Generation"]
112    #[inline(always)]
113    pub fn ch8pulse(&mut self) -> CH8PULSE_W {
114        CH8PULSE_W::new(self)
115    }
116    #[doc = "Bit 9 - Channel 9 Pulse Generation"]
117    #[inline(always)]
118    pub fn ch9pulse(&mut self) -> CH9PULSE_W {
119        CH9PULSE_W::new(self)
120    }
121    #[doc = "Bit 10 - Channel 10 Pulse Generation"]
122    #[inline(always)]
123    pub fn ch10pulse(&mut self) -> CH10PULSE_W {
124        CH10PULSE_W::new(self)
125    }
126    #[doc = "Bit 11 - Channel 11 Pulse Generation"]
127    #[inline(always)]
128    pub fn ch11pulse(&mut self) -> CH11PULSE_W {
129        CH11PULSE_W::new(self)
130    }
131    #[doc = "Bit 12 - Channel 12 Pulse Generation"]
132    #[inline(always)]
133    pub fn ch12pulse(&mut self) -> CH12PULSE_W {
134        CH12PULSE_W::new(self)
135    }
136    #[doc = "Bit 13 - Channel 13 Pulse Generation"]
137    #[inline(always)]
138    pub fn ch13pulse(&mut self) -> CH13PULSE_W {
139        CH13PULSE_W::new(self)
140    }
141    #[doc = "Bit 14 - Channel 14 Pulse Generation"]
142    #[inline(always)]
143    pub fn ch14pulse(&mut self) -> CH14PULSE_W {
144        CH14PULSE_W::new(self)
145    }
146    #[doc = "Bit 15 - Channel 15 Pulse Generation"]
147    #[inline(always)]
148    pub fn ch15pulse(&mut self) -> CH15PULSE_W {
149        CH15PULSE_W::new(self)
150    }
151    #[doc = "Bit 16 - Channel 16 Pulse Generation"]
152    #[inline(always)]
153    pub fn ch16pulse(&mut self) -> CH16PULSE_W {
154        CH16PULSE_W::new(self)
155    }
156    #[doc = "Bit 17 - Channel 17 Pulse Generation"]
157    #[inline(always)]
158    pub fn ch17pulse(&mut self) -> CH17PULSE_W {
159        CH17PULSE_W::new(self)
160    }
161    #[doc = "Bit 18 - Channel 18 Pulse Generation"]
162    #[inline(always)]
163    pub fn ch18pulse(&mut self) -> CH18PULSE_W {
164        CH18PULSE_W::new(self)
165    }
166    #[doc = "Bit 19 - Channel 19 Pulse Generation"]
167    #[inline(always)]
168    pub fn ch19pulse(&mut self) -> CH19PULSE_W {
169        CH19PULSE_W::new(self)
170    }
171    #[doc = "Bit 20 - Channel 20 Pulse Generation"]
172    #[inline(always)]
173    pub fn ch20pulse(&mut self) -> CH20PULSE_W {
174        CH20PULSE_W::new(self)
175    }
176    #[doc = "Bit 21 - Channel 21 Pulse Generation"]
177    #[inline(always)]
178    pub fn ch21pulse(&mut self) -> CH21PULSE_W {
179        CH21PULSE_W::new(self)
180    }
181    #[doc = "Bit 22 - Channel 22 Pulse Generation"]
182    #[inline(always)]
183    pub fn ch22pulse(&mut self) -> CH22PULSE_W {
184        CH22PULSE_W::new(self)
185    }
186    #[doc = "Bit 23 - Channel 23 Pulse Generation"]
187    #[inline(always)]
188    pub fn ch23pulse(&mut self) -> CH23PULSE_W {
189        CH23PULSE_W::new(self)
190    }
191    #[doc = "Writes raw bits to the register."]
192    #[inline(always)]
193    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
194        self.0.bits(bits);
195        self
196    }
197}
198#[doc = "Software Pulse Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [swpulse](index.html) module"]
199pub struct SWPULSE_SPEC;
200impl crate::RegisterSpec for SWPULSE_SPEC {
201    type Ux = u32;
202}
203#[doc = "`write(|w| ..)` method takes [swpulse::W](W) writer structure"]
204impl crate::Writable for SWPULSE_SPEC {
205    type Writer = W;
206}
207#[doc = "`reset()` method sets SWPULSE to value 0"]
208impl crate::Resettable for SWPULSE_SPEC {
209    #[inline(always)]
210    fn reset_value() -> Self::Ux {
211        0
212    }
213}