1#[doc = "Register `SWBRK` reader"]
2pub struct R(crate::R<SWBRK_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SWBRK_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SWBRK_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SWBRK_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `SWBRK` writer"]
17pub struct W(crate::W<SWBRK_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SWBRK_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<SWBRK_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SWBRK_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `PWM0A` reader - PWM0A field"]
38pub type PWM0A_R = crate::BitReader<bool>;
39#[doc = "Field `PWM0A` writer - PWM0A field"]
40pub type PWM0A_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
41#[doc = "Field `PWM1A` reader - PWM1A field"]
42pub type PWM1A_R = crate::BitReader<bool>;
43#[doc = "Field `PWM1A` writer - PWM1A field"]
44pub type PWM1A_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
45#[doc = "Field `PWM2A` reader - PWM2A field"]
46pub type PWM2A_R = crate::BitReader<bool>;
47#[doc = "Field `PWM2A` writer - PWM2A field"]
48pub type PWM2A_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
49#[doc = "Field `PWM3A` reader - PWM3A field"]
50pub type PWM3A_R = crate::BitReader<bool>;
51#[doc = "Field `PWM3A` writer - PWM3A field"]
52pub type PWM3A_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
53#[doc = "Field `PWM4A` reader - PWM4A field"]
54pub type PWM4A_R = crate::BitReader<bool>;
55#[doc = "Field `PWM4A` writer - PWM4A field"]
56pub type PWM4A_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
57#[doc = "Field `PWM0B` reader - PWM0B field"]
58pub type PWM0B_R = crate::BitReader<bool>;
59#[doc = "Field `PWM0B` writer - PWM0B field"]
60pub type PWM0B_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
61#[doc = "Field `PWM1B` reader - PWM1B field"]
62pub type PWM1B_R = crate::BitReader<bool>;
63#[doc = "Field `PWM1B` writer - PWM1B field"]
64pub type PWM1B_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
65#[doc = "Field `PWM2B` reader - PWM2B field"]
66pub type PWM2B_R = crate::BitReader<bool>;
67#[doc = "Field `PWM2B` writer - PWM2B field"]
68pub type PWM2B_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
69#[doc = "Field `PWM3B` reader - PWM3B field"]
70pub type PWM3B_R = crate::BitReader<bool>;
71#[doc = "Field `PWM3B` writer - PWM3B field"]
72pub type PWM3B_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
73#[doc = "Field `PWM4B` reader - PWM4B field"]
74pub type PWM4B_R = crate::BitReader<bool>;
75#[doc = "Field `PWM4B` writer - PWM4B field"]
76pub type PWM4B_W<'a, const O: u8> = crate::BitWriter<'a, u32, SWBRK_SPEC, bool, O>;
77impl R {
78 #[doc = "Bit 0 - PWM0A field"]
79 #[inline(always)]
80 pub fn pwm0a(&self) -> PWM0A_R {
81 PWM0A_R::new((self.bits & 1) != 0)
82 }
83 #[doc = "Bit 1 - PWM1A field"]
84 #[inline(always)]
85 pub fn pwm1a(&self) -> PWM1A_R {
86 PWM1A_R::new(((self.bits >> 1) & 1) != 0)
87 }
88 #[doc = "Bit 2 - PWM2A field"]
89 #[inline(always)]
90 pub fn pwm2a(&self) -> PWM2A_R {
91 PWM2A_R::new(((self.bits >> 2) & 1) != 0)
92 }
93 #[doc = "Bit 3 - PWM3A field"]
94 #[inline(always)]
95 pub fn pwm3a(&self) -> PWM3A_R {
96 PWM3A_R::new(((self.bits >> 3) & 1) != 0)
97 }
98 #[doc = "Bit 4 - PWM4A field"]
99 #[inline(always)]
100 pub fn pwm4a(&self) -> PWM4A_R {
101 PWM4A_R::new(((self.bits >> 4) & 1) != 0)
102 }
103 #[doc = "Bit 8 - PWM0B field"]
104 #[inline(always)]
105 pub fn pwm0b(&self) -> PWM0B_R {
106 PWM0B_R::new(((self.bits >> 8) & 1) != 0)
107 }
108 #[doc = "Bit 9 - PWM1B field"]
109 #[inline(always)]
110 pub fn pwm1b(&self) -> PWM1B_R {
111 PWM1B_R::new(((self.bits >> 9) & 1) != 0)
112 }
113 #[doc = "Bit 10 - PWM2B field"]
114 #[inline(always)]
115 pub fn pwm2b(&self) -> PWM2B_R {
116 PWM2B_R::new(((self.bits >> 10) & 1) != 0)
117 }
118 #[doc = "Bit 11 - PWM3B field"]
119 #[inline(always)]
120 pub fn pwm3b(&self) -> PWM3B_R {
121 PWM3B_R::new(((self.bits >> 11) & 1) != 0)
122 }
123 #[doc = "Bit 12 - PWM4B field"]
124 #[inline(always)]
125 pub fn pwm4b(&self) -> PWM4B_R {
126 PWM4B_R::new(((self.bits >> 12) & 1) != 0)
127 }
128}
129impl W {
130 #[doc = "Bit 0 - PWM0A field"]
131 #[inline(always)]
132 pub fn pwm0a(&mut self) -> PWM0A_W<0> {
133 PWM0A_W::new(self)
134 }
135 #[doc = "Bit 1 - PWM1A field"]
136 #[inline(always)]
137 pub fn pwm1a(&mut self) -> PWM1A_W<1> {
138 PWM1A_W::new(self)
139 }
140 #[doc = "Bit 2 - PWM2A field"]
141 #[inline(always)]
142 pub fn pwm2a(&mut self) -> PWM2A_W<2> {
143 PWM2A_W::new(self)
144 }
145 #[doc = "Bit 3 - PWM3A field"]
146 #[inline(always)]
147 pub fn pwm3a(&mut self) -> PWM3A_W<3> {
148 PWM3A_W::new(self)
149 }
150 #[doc = "Bit 4 - PWM4A field"]
151 #[inline(always)]
152 pub fn pwm4a(&mut self) -> PWM4A_W<4> {
153 PWM4A_W::new(self)
154 }
155 #[doc = "Bit 8 - PWM0B field"]
156 #[inline(always)]
157 pub fn pwm0b(&mut self) -> PWM0B_W<8> {
158 PWM0B_W::new(self)
159 }
160 #[doc = "Bit 9 - PWM1B field"]
161 #[inline(always)]
162 pub fn pwm1b(&mut self) -> PWM1B_W<9> {
163 PWM1B_W::new(self)
164 }
165 #[doc = "Bit 10 - PWM2B field"]
166 #[inline(always)]
167 pub fn pwm2b(&mut self) -> PWM2B_W<10> {
168 PWM2B_W::new(self)
169 }
170 #[doc = "Bit 11 - PWM3B field"]
171 #[inline(always)]
172 pub fn pwm3b(&mut self) -> PWM3B_W<11> {
173 PWM3B_W::new(self)
174 }
175 #[doc = "Bit 12 - PWM4B field"]
176 #[inline(always)]
177 pub fn pwm4b(&mut self) -> PWM4B_W<12> {
178 PWM4B_W::new(self)
179 }
180 #[doc = "Writes raw bits to the register."]
181 #[inline(always)]
182 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
183 self.0.bits(bits);
184 self
185 }
186}
187#[doc = "SWBRK 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 [swbrk](index.html) module"]
188pub struct SWBRK_SPEC;
189impl crate::RegisterSpec for SWBRK_SPEC {
190 type Ux = u32;
191}
192#[doc = "`read()` method returns [swbrk::R](R) reader structure"]
193impl crate::Readable for SWBRK_SPEC {
194 type Reader = R;
195}
196#[doc = "`write(|w| ..)` method takes [swbrk::W](W) writer structure"]
197impl crate::Writable for SWBRK_SPEC {
198 type Writer = W;
199}
200#[doc = "`reset()` method sets SWBRK to value 0"]
201impl crate::Resettable for SWBRK_SPEC {
202 #[inline(always)]
203 fn reset_value() -> Self::Ux {
204 0
205 }
206}