1#[doc = "Register `OS` reader"]
2pub type R = crate::R<OsSpec>;
3#[doc = "Register `OS` writer"]
4pub type W = crate::W<OsSpec>;
5#[doc = "Field `OSH0` reader - Output Selection for PWMH output of the channel 0"]
6pub type Osh0R = crate::BitReader;
7#[doc = "Field `OSH0` writer - Output Selection for PWMH output of the channel 0"]
8pub type Osh0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `OSH1` reader - Output Selection for PWMH output of the channel 1"]
10pub type Osh1R = crate::BitReader;
11#[doc = "Field `OSH1` writer - Output Selection for PWMH output of the channel 1"]
12pub type Osh1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `OSH2` reader - Output Selection for PWMH output of the channel 2"]
14pub type Osh2R = crate::BitReader;
15#[doc = "Field `OSH2` writer - Output Selection for PWMH output of the channel 2"]
16pub type Osh2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `OSH3` reader - Output Selection for PWMH output of the channel 3"]
18pub type Osh3R = crate::BitReader;
19#[doc = "Field `OSH3` writer - Output Selection for PWMH output of the channel 3"]
20pub type Osh3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `OSH4` reader - Output Selection for PWMH output of the channel 4"]
22pub type Osh4R = crate::BitReader;
23#[doc = "Field `OSH4` writer - Output Selection for PWMH output of the channel 4"]
24pub type Osh4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `OSH5` reader - Output Selection for PWMH output of the channel 5"]
26pub type Osh5R = crate::BitReader;
27#[doc = "Field `OSH5` writer - Output Selection for PWMH output of the channel 5"]
28pub type Osh5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `OSH6` reader - Output Selection for PWMH output of the channel 6"]
30pub type Osh6R = crate::BitReader;
31#[doc = "Field `OSH6` writer - Output Selection for PWMH output of the channel 6"]
32pub type Osh6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `OSH7` reader - Output Selection for PWMH output of the channel 7"]
34pub type Osh7R = crate::BitReader;
35#[doc = "Field `OSH7` writer - Output Selection for PWMH output of the channel 7"]
36pub type Osh7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `OSL0` reader - Output Selection for PWML output of the channel 0"]
38pub type Osl0R = crate::BitReader;
39#[doc = "Field `OSL0` writer - Output Selection for PWML output of the channel 0"]
40pub type Osl0W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `OSL1` reader - Output Selection for PWML output of the channel 1"]
42pub type Osl1R = crate::BitReader;
43#[doc = "Field `OSL1` writer - Output Selection for PWML output of the channel 1"]
44pub type Osl1W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `OSL2` reader - Output Selection for PWML output of the channel 2"]
46pub type Osl2R = crate::BitReader;
47#[doc = "Field `OSL2` writer - Output Selection for PWML output of the channel 2"]
48pub type Osl2W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `OSL3` reader - Output Selection for PWML output of the channel 3"]
50pub type Osl3R = crate::BitReader;
51#[doc = "Field `OSL3` writer - Output Selection for PWML output of the channel 3"]
52pub type Osl3W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `OSL4` reader - Output Selection for PWML output of the channel 4"]
54pub type Osl4R = crate::BitReader;
55#[doc = "Field `OSL4` writer - Output Selection for PWML output of the channel 4"]
56pub type Osl4W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `OSL5` reader - Output Selection for PWML output of the channel 5"]
58pub type Osl5R = crate::BitReader;
59#[doc = "Field `OSL5` writer - Output Selection for PWML output of the channel 5"]
60pub type Osl5W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `OSL6` reader - Output Selection for PWML output of the channel 6"]
62pub type Osl6R = crate::BitReader;
63#[doc = "Field `OSL6` writer - Output Selection for PWML output of the channel 6"]
64pub type Osl6W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `OSL7` reader - Output Selection for PWML output of the channel 7"]
66pub type Osl7R = crate::BitReader;
67#[doc = "Field `OSL7` writer - Output Selection for PWML output of the channel 7"]
68pub type Osl7W<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70 #[doc = "Bit 0 - Output Selection for PWMH output of the channel 0"]
71 #[inline(always)]
72 pub fn osh0(&self) -> Osh0R {
73 Osh0R::new((self.bits & 1) != 0)
74 }
75 #[doc = "Bit 1 - Output Selection for PWMH output of the channel 1"]
76 #[inline(always)]
77 pub fn osh1(&self) -> Osh1R {
78 Osh1R::new(((self.bits >> 1) & 1) != 0)
79 }
80 #[doc = "Bit 2 - Output Selection for PWMH output of the channel 2"]
81 #[inline(always)]
82 pub fn osh2(&self) -> Osh2R {
83 Osh2R::new(((self.bits >> 2) & 1) != 0)
84 }
85 #[doc = "Bit 3 - Output Selection for PWMH output of the channel 3"]
86 #[inline(always)]
87 pub fn osh3(&self) -> Osh3R {
88 Osh3R::new(((self.bits >> 3) & 1) != 0)
89 }
90 #[doc = "Bit 4 - Output Selection for PWMH output of the channel 4"]
91 #[inline(always)]
92 pub fn osh4(&self) -> Osh4R {
93 Osh4R::new(((self.bits >> 4) & 1) != 0)
94 }
95 #[doc = "Bit 5 - Output Selection for PWMH output of the channel 5"]
96 #[inline(always)]
97 pub fn osh5(&self) -> Osh5R {
98 Osh5R::new(((self.bits >> 5) & 1) != 0)
99 }
100 #[doc = "Bit 6 - Output Selection for PWMH output of the channel 6"]
101 #[inline(always)]
102 pub fn osh6(&self) -> Osh6R {
103 Osh6R::new(((self.bits >> 6) & 1) != 0)
104 }
105 #[doc = "Bit 7 - Output Selection for PWMH output of the channel 7"]
106 #[inline(always)]
107 pub fn osh7(&self) -> Osh7R {
108 Osh7R::new(((self.bits >> 7) & 1) != 0)
109 }
110 #[doc = "Bit 16 - Output Selection for PWML output of the channel 0"]
111 #[inline(always)]
112 pub fn osl0(&self) -> Osl0R {
113 Osl0R::new(((self.bits >> 16) & 1) != 0)
114 }
115 #[doc = "Bit 17 - Output Selection for PWML output of the channel 1"]
116 #[inline(always)]
117 pub fn osl1(&self) -> Osl1R {
118 Osl1R::new(((self.bits >> 17) & 1) != 0)
119 }
120 #[doc = "Bit 18 - Output Selection for PWML output of the channel 2"]
121 #[inline(always)]
122 pub fn osl2(&self) -> Osl2R {
123 Osl2R::new(((self.bits >> 18) & 1) != 0)
124 }
125 #[doc = "Bit 19 - Output Selection for PWML output of the channel 3"]
126 #[inline(always)]
127 pub fn osl3(&self) -> Osl3R {
128 Osl3R::new(((self.bits >> 19) & 1) != 0)
129 }
130 #[doc = "Bit 20 - Output Selection for PWML output of the channel 4"]
131 #[inline(always)]
132 pub fn osl4(&self) -> Osl4R {
133 Osl4R::new(((self.bits >> 20) & 1) != 0)
134 }
135 #[doc = "Bit 21 - Output Selection for PWML output of the channel 5"]
136 #[inline(always)]
137 pub fn osl5(&self) -> Osl5R {
138 Osl5R::new(((self.bits >> 21) & 1) != 0)
139 }
140 #[doc = "Bit 22 - Output Selection for PWML output of the channel 6"]
141 #[inline(always)]
142 pub fn osl6(&self) -> Osl6R {
143 Osl6R::new(((self.bits >> 22) & 1) != 0)
144 }
145 #[doc = "Bit 23 - Output Selection for PWML output of the channel 7"]
146 #[inline(always)]
147 pub fn osl7(&self) -> Osl7R {
148 Osl7R::new(((self.bits >> 23) & 1) != 0)
149 }
150}
151impl W {
152 #[doc = "Bit 0 - Output Selection for PWMH output of the channel 0"]
153 #[inline(always)]
154 #[must_use]
155 pub fn osh0(&mut self) -> Osh0W<OsSpec> {
156 Osh0W::new(self, 0)
157 }
158 #[doc = "Bit 1 - Output Selection for PWMH output of the channel 1"]
159 #[inline(always)]
160 #[must_use]
161 pub fn osh1(&mut self) -> Osh1W<OsSpec> {
162 Osh1W::new(self, 1)
163 }
164 #[doc = "Bit 2 - Output Selection for PWMH output of the channel 2"]
165 #[inline(always)]
166 #[must_use]
167 pub fn osh2(&mut self) -> Osh2W<OsSpec> {
168 Osh2W::new(self, 2)
169 }
170 #[doc = "Bit 3 - Output Selection for PWMH output of the channel 3"]
171 #[inline(always)]
172 #[must_use]
173 pub fn osh3(&mut self) -> Osh3W<OsSpec> {
174 Osh3W::new(self, 3)
175 }
176 #[doc = "Bit 4 - Output Selection for PWMH output of the channel 4"]
177 #[inline(always)]
178 #[must_use]
179 pub fn osh4(&mut self) -> Osh4W<OsSpec> {
180 Osh4W::new(self, 4)
181 }
182 #[doc = "Bit 5 - Output Selection for PWMH output of the channel 5"]
183 #[inline(always)]
184 #[must_use]
185 pub fn osh5(&mut self) -> Osh5W<OsSpec> {
186 Osh5W::new(self, 5)
187 }
188 #[doc = "Bit 6 - Output Selection for PWMH output of the channel 6"]
189 #[inline(always)]
190 #[must_use]
191 pub fn osh6(&mut self) -> Osh6W<OsSpec> {
192 Osh6W::new(self, 6)
193 }
194 #[doc = "Bit 7 - Output Selection for PWMH output of the channel 7"]
195 #[inline(always)]
196 #[must_use]
197 pub fn osh7(&mut self) -> Osh7W<OsSpec> {
198 Osh7W::new(self, 7)
199 }
200 #[doc = "Bit 16 - Output Selection for PWML output of the channel 0"]
201 #[inline(always)]
202 #[must_use]
203 pub fn osl0(&mut self) -> Osl0W<OsSpec> {
204 Osl0W::new(self, 16)
205 }
206 #[doc = "Bit 17 - Output Selection for PWML output of the channel 1"]
207 #[inline(always)]
208 #[must_use]
209 pub fn osl1(&mut self) -> Osl1W<OsSpec> {
210 Osl1W::new(self, 17)
211 }
212 #[doc = "Bit 18 - Output Selection for PWML output of the channel 2"]
213 #[inline(always)]
214 #[must_use]
215 pub fn osl2(&mut self) -> Osl2W<OsSpec> {
216 Osl2W::new(self, 18)
217 }
218 #[doc = "Bit 19 - Output Selection for PWML output of the channel 3"]
219 #[inline(always)]
220 #[must_use]
221 pub fn osl3(&mut self) -> Osl3W<OsSpec> {
222 Osl3W::new(self, 19)
223 }
224 #[doc = "Bit 20 - Output Selection for PWML output of the channel 4"]
225 #[inline(always)]
226 #[must_use]
227 pub fn osl4(&mut self) -> Osl4W<OsSpec> {
228 Osl4W::new(self, 20)
229 }
230 #[doc = "Bit 21 - Output Selection for PWML output of the channel 5"]
231 #[inline(always)]
232 #[must_use]
233 pub fn osl5(&mut self) -> Osl5W<OsSpec> {
234 Osl5W::new(self, 21)
235 }
236 #[doc = "Bit 22 - Output Selection for PWML output of the channel 6"]
237 #[inline(always)]
238 #[must_use]
239 pub fn osl6(&mut self) -> Osl6W<OsSpec> {
240 Osl6W::new(self, 22)
241 }
242 #[doc = "Bit 23 - Output Selection for PWML output of the channel 7"]
243 #[inline(always)]
244 #[must_use]
245 pub fn osl7(&mut self) -> Osl7W<OsSpec> {
246 Osl7W::new(self, 23)
247 }
248}
249#[doc = "PWM Output Selection Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`os::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 [`os::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
250pub struct OsSpec;
251impl crate::RegisterSpec for OsSpec {
252 type Ux = u32;
253}
254#[doc = "`read()` method returns [`os::R`](R) reader structure"]
255impl crate::Readable for OsSpec {}
256#[doc = "`write(|w| ..)` method takes [`os::W`](W) writer structure"]
257impl crate::Writable for OsSpec {
258 type Safety = crate::Unsafe;
259 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
260 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
261}
262#[doc = "`reset()` method sets OS to value 0"]
263impl crate::Resettable for OsSpec {
264 const RESET_VALUE: u32 = 0;
265}