1#[doc = "Register `MINTSET` reader"]
2pub type R = crate::R<MintsetSpec>;
3#[doc = "Register `MINTSET` writer"]
4pub type W = crate::W<MintsetSpec>;
5#[doc = "Target Start Interrupt Enable\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum Slvstart {
9 #[doc = "0: Disable"]
10 Disable = 0,
11 #[doc = "1: Enable"]
12 Enable = 1,
13}
14impl From<Slvstart> for bool {
15 #[inline(always)]
16 fn from(variant: Slvstart) -> Self {
17 variant as u8 != 0
18 }
19}
20#[doc = "Field `SLVSTART` reader - Target Start Interrupt Enable"]
21pub type SlvstartR = crate::BitReader<Slvstart>;
22impl SlvstartR {
23 #[doc = "Get enumerated values variant"]
24 #[inline(always)]
25 pub const fn variant(&self) -> Slvstart {
26 match self.bits {
27 false => Slvstart::Disable,
28 true => Slvstart::Enable,
29 }
30 }
31 #[doc = "Disable"]
32 #[inline(always)]
33 pub fn is_disable(&self) -> bool {
34 *self == Slvstart::Disable
35 }
36 #[doc = "Enable"]
37 #[inline(always)]
38 pub fn is_enable(&self) -> bool {
39 *self == Slvstart::Enable
40 }
41}
42#[doc = "Field `SLVSTART` writer - Target Start Interrupt Enable"]
43pub type SlvstartW<'a, REG> = crate::BitWriter1S<'a, REG, Slvstart>;
44impl<'a, REG> SlvstartW<'a, REG>
45where
46 REG: crate::Writable + crate::RegisterSpec,
47{
48 #[doc = "Disable"]
49 #[inline(always)]
50 pub fn disable(self) -> &'a mut crate::W<REG> {
51 self.variant(Slvstart::Disable)
52 }
53 #[doc = "Enable"]
54 #[inline(always)]
55 pub fn enable(self) -> &'a mut crate::W<REG> {
56 self.variant(Slvstart::Enable)
57 }
58}
59#[doc = "Controller Control Done Interrupt Enable\n\nValue on reset: 0"]
60#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum Mctrldone {
63 #[doc = "0: Disable"]
64 Disable = 0,
65 #[doc = "1: Enable"]
66 Enable = 1,
67}
68impl From<Mctrldone> for bool {
69 #[inline(always)]
70 fn from(variant: Mctrldone) -> Self {
71 variant as u8 != 0
72 }
73}
74#[doc = "Field `MCTRLDONE` reader - Controller Control Done Interrupt Enable"]
75pub type MctrldoneR = crate::BitReader<Mctrldone>;
76impl MctrldoneR {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub const fn variant(&self) -> Mctrldone {
80 match self.bits {
81 false => Mctrldone::Disable,
82 true => Mctrldone::Enable,
83 }
84 }
85 #[doc = "Disable"]
86 #[inline(always)]
87 pub fn is_disable(&self) -> bool {
88 *self == Mctrldone::Disable
89 }
90 #[doc = "Enable"]
91 #[inline(always)]
92 pub fn is_enable(&self) -> bool {
93 *self == Mctrldone::Enable
94 }
95}
96#[doc = "Field `MCTRLDONE` writer - Controller Control Done Interrupt Enable"]
97pub type MctrldoneW<'a, REG> = crate::BitWriter1S<'a, REG, Mctrldone>;
98impl<'a, REG> MctrldoneW<'a, REG>
99where
100 REG: crate::Writable + crate::RegisterSpec,
101{
102 #[doc = "Disable"]
103 #[inline(always)]
104 pub fn disable(self) -> &'a mut crate::W<REG> {
105 self.variant(Mctrldone::Disable)
106 }
107 #[doc = "Enable"]
108 #[inline(always)]
109 pub fn enable(self) -> &'a mut crate::W<REG> {
110 self.variant(Mctrldone::Enable)
111 }
112}
113#[doc = "Completed Message Interrupt Enable\n\nValue on reset: 0"]
114#[cfg_attr(feature = "defmt", derive(defmt::Format))]
115#[derive(Clone, Copy, Debug, PartialEq, Eq)]
116pub enum Complete {
117 #[doc = "0: Disable"]
118 Disable = 0,
119 #[doc = "1: Enable"]
120 Enable = 1,
121}
122impl From<Complete> for bool {
123 #[inline(always)]
124 fn from(variant: Complete) -> Self {
125 variant as u8 != 0
126 }
127}
128#[doc = "Field `COMPLETE` reader - Completed Message Interrupt Enable"]
129pub type CompleteR = crate::BitReader<Complete>;
130impl CompleteR {
131 #[doc = "Get enumerated values variant"]
132 #[inline(always)]
133 pub const fn variant(&self) -> Complete {
134 match self.bits {
135 false => Complete::Disable,
136 true => Complete::Enable,
137 }
138 }
139 #[doc = "Disable"]
140 #[inline(always)]
141 pub fn is_disable(&self) -> bool {
142 *self == Complete::Disable
143 }
144 #[doc = "Enable"]
145 #[inline(always)]
146 pub fn is_enable(&self) -> bool {
147 *self == Complete::Enable
148 }
149}
150#[doc = "Field `COMPLETE` writer - Completed Message Interrupt Enable"]
151pub type CompleteW<'a, REG> = crate::BitWriter1S<'a, REG, Complete>;
152impl<'a, REG> CompleteW<'a, REG>
153where
154 REG: crate::Writable + crate::RegisterSpec,
155{
156 #[doc = "Disable"]
157 #[inline(always)]
158 pub fn disable(self) -> &'a mut crate::W<REG> {
159 self.variant(Complete::Disable)
160 }
161 #[doc = "Enable"]
162 #[inline(always)]
163 pub fn enable(self) -> &'a mut crate::W<REG> {
164 self.variant(Complete::Enable)
165 }
166}
167#[doc = "Field `RXPEND` reader - Receive Pending Interrupt Enable"]
168pub type RxpendR = crate::BitReader;
169#[doc = "Field `RXPEND` writer - Receive Pending Interrupt Enable"]
170pub type RxpendW<'a, REG> = crate::BitWriter1S<'a, REG>;
171#[doc = "Transmit Buffer/FIFO Not Full Interrupt Enable\n\nValue on reset: 0"]
172#[cfg_attr(feature = "defmt", derive(defmt::Format))]
173#[derive(Clone, Copy, Debug, PartialEq, Eq)]
174pub enum Txnotfull {
175 #[doc = "0: Disable"]
176 Disable = 0,
177 #[doc = "1: Enable"]
178 Enable = 1,
179}
180impl From<Txnotfull> for bool {
181 #[inline(always)]
182 fn from(variant: Txnotfull) -> Self {
183 variant as u8 != 0
184 }
185}
186#[doc = "Field `TXNOTFULL` reader - Transmit Buffer/FIFO Not Full Interrupt Enable"]
187pub type TxnotfullR = crate::BitReader<Txnotfull>;
188impl TxnotfullR {
189 #[doc = "Get enumerated values variant"]
190 #[inline(always)]
191 pub const fn variant(&self) -> Txnotfull {
192 match self.bits {
193 false => Txnotfull::Disable,
194 true => Txnotfull::Enable,
195 }
196 }
197 #[doc = "Disable"]
198 #[inline(always)]
199 pub fn is_disable(&self) -> bool {
200 *self == Txnotfull::Disable
201 }
202 #[doc = "Enable"]
203 #[inline(always)]
204 pub fn is_enable(&self) -> bool {
205 *self == Txnotfull::Enable
206 }
207}
208#[doc = "Field `TXNOTFULL` writer - Transmit Buffer/FIFO Not Full Interrupt Enable"]
209pub type TxnotfullW<'a, REG> = crate::BitWriter1S<'a, REG, Txnotfull>;
210impl<'a, REG> TxnotfullW<'a, REG>
211where
212 REG: crate::Writable + crate::RegisterSpec,
213{
214 #[doc = "Disable"]
215 #[inline(always)]
216 pub fn disable(self) -> &'a mut crate::W<REG> {
217 self.variant(Txnotfull::Disable)
218 }
219 #[doc = "Enable"]
220 #[inline(always)]
221 pub fn enable(self) -> &'a mut crate::W<REG> {
222 self.variant(Txnotfull::Enable)
223 }
224}
225#[doc = "IBI Won Interrupt Enable\n\nValue on reset: 0"]
226#[cfg_attr(feature = "defmt", derive(defmt::Format))]
227#[derive(Clone, Copy, Debug, PartialEq, Eq)]
228pub enum Ibiwon {
229 #[doc = "0: Disable"]
230 Disable = 0,
231 #[doc = "1: Enable"]
232 Enable = 1,
233}
234impl From<Ibiwon> for bool {
235 #[inline(always)]
236 fn from(variant: Ibiwon) -> Self {
237 variant as u8 != 0
238 }
239}
240#[doc = "Field `IBIWON` reader - IBI Won Interrupt Enable"]
241pub type IbiwonR = crate::BitReader<Ibiwon>;
242impl IbiwonR {
243 #[doc = "Get enumerated values variant"]
244 #[inline(always)]
245 pub const fn variant(&self) -> Ibiwon {
246 match self.bits {
247 false => Ibiwon::Disable,
248 true => Ibiwon::Enable,
249 }
250 }
251 #[doc = "Disable"]
252 #[inline(always)]
253 pub fn is_disable(&self) -> bool {
254 *self == Ibiwon::Disable
255 }
256 #[doc = "Enable"]
257 #[inline(always)]
258 pub fn is_enable(&self) -> bool {
259 *self == Ibiwon::Enable
260 }
261}
262#[doc = "Field `IBIWON` writer - IBI Won Interrupt Enable"]
263pub type IbiwonW<'a, REG> = crate::BitWriter1S<'a, REG, Ibiwon>;
264impl<'a, REG> IbiwonW<'a, REG>
265where
266 REG: crate::Writable + crate::RegisterSpec,
267{
268 #[doc = "Disable"]
269 #[inline(always)]
270 pub fn disable(self) -> &'a mut crate::W<REG> {
271 self.variant(Ibiwon::Disable)
272 }
273 #[doc = "Enable"]
274 #[inline(always)]
275 pub fn enable(self) -> &'a mut crate::W<REG> {
276 self.variant(Ibiwon::Enable)
277 }
278}
279#[doc = "Error or Warning (ERRWARN) Interrupt Enable\n\nValue on reset: 0"]
280#[cfg_attr(feature = "defmt", derive(defmt::Format))]
281#[derive(Clone, Copy, Debug, PartialEq, Eq)]
282pub enum Errwarn {
283 #[doc = "0: Disable"]
284 Disable = 0,
285 #[doc = "1: Enable"]
286 Enable = 1,
287}
288impl From<Errwarn> for bool {
289 #[inline(always)]
290 fn from(variant: Errwarn) -> Self {
291 variant as u8 != 0
292 }
293}
294#[doc = "Field `ERRWARN` reader - Error or Warning (ERRWARN) Interrupt Enable"]
295pub type ErrwarnR = crate::BitReader<Errwarn>;
296impl ErrwarnR {
297 #[doc = "Get enumerated values variant"]
298 #[inline(always)]
299 pub const fn variant(&self) -> Errwarn {
300 match self.bits {
301 false => Errwarn::Disable,
302 true => Errwarn::Enable,
303 }
304 }
305 #[doc = "Disable"]
306 #[inline(always)]
307 pub fn is_disable(&self) -> bool {
308 *self == Errwarn::Disable
309 }
310 #[doc = "Enable"]
311 #[inline(always)]
312 pub fn is_enable(&self) -> bool {
313 *self == Errwarn::Enable
314 }
315}
316#[doc = "Field `ERRWARN` writer - Error or Warning (ERRWARN) Interrupt Enable"]
317pub type ErrwarnW<'a, REG> = crate::BitWriter1S<'a, REG, Errwarn>;
318impl<'a, REG> ErrwarnW<'a, REG>
319where
320 REG: crate::Writable + crate::RegisterSpec,
321{
322 #[doc = "Disable"]
323 #[inline(always)]
324 pub fn disable(self) -> &'a mut crate::W<REG> {
325 self.variant(Errwarn::Disable)
326 }
327 #[doc = "Enable"]
328 #[inline(always)]
329 pub fn enable(self) -> &'a mut crate::W<REG> {
330 self.variant(Errwarn::Enable)
331 }
332}
333#[doc = "Now Controller Interrupt Enable\n\nValue on reset: 0"]
334#[cfg_attr(feature = "defmt", derive(defmt::Format))]
335#[derive(Clone, Copy, Debug, PartialEq, Eq)]
336pub enum Nowmaster {
337 #[doc = "0: Disable"]
338 Disable = 0,
339 #[doc = "1: Enable"]
340 Enable = 1,
341}
342impl From<Nowmaster> for bool {
343 #[inline(always)]
344 fn from(variant: Nowmaster) -> Self {
345 variant as u8 != 0
346 }
347}
348#[doc = "Field `NOWMASTER` reader - Now Controller Interrupt Enable"]
349pub type NowmasterR = crate::BitReader<Nowmaster>;
350impl NowmasterR {
351 #[doc = "Get enumerated values variant"]
352 #[inline(always)]
353 pub const fn variant(&self) -> Nowmaster {
354 match self.bits {
355 false => Nowmaster::Disable,
356 true => Nowmaster::Enable,
357 }
358 }
359 #[doc = "Disable"]
360 #[inline(always)]
361 pub fn is_disable(&self) -> bool {
362 *self == Nowmaster::Disable
363 }
364 #[doc = "Enable"]
365 #[inline(always)]
366 pub fn is_enable(&self) -> bool {
367 *self == Nowmaster::Enable
368 }
369}
370#[doc = "Field `NOWMASTER` writer - Now Controller Interrupt Enable"]
371pub type NowmasterW<'a, REG> = crate::BitWriter1S<'a, REG, Nowmaster>;
372impl<'a, REG> NowmasterW<'a, REG>
373where
374 REG: crate::Writable + crate::RegisterSpec,
375{
376 #[doc = "Disable"]
377 #[inline(always)]
378 pub fn disable(self) -> &'a mut crate::W<REG> {
379 self.variant(Nowmaster::Disable)
380 }
381 #[doc = "Enable"]
382 #[inline(always)]
383 pub fn enable(self) -> &'a mut crate::W<REG> {
384 self.variant(Nowmaster::Enable)
385 }
386}
387impl R {
388 #[doc = "Bit 8 - Target Start Interrupt Enable"]
389 #[inline(always)]
390 pub fn slvstart(&self) -> SlvstartR {
391 SlvstartR::new(((self.bits >> 8) & 1) != 0)
392 }
393 #[doc = "Bit 9 - Controller Control Done Interrupt Enable"]
394 #[inline(always)]
395 pub fn mctrldone(&self) -> MctrldoneR {
396 MctrldoneR::new(((self.bits >> 9) & 1) != 0)
397 }
398 #[doc = "Bit 10 - Completed Message Interrupt Enable"]
399 #[inline(always)]
400 pub fn complete(&self) -> CompleteR {
401 CompleteR::new(((self.bits >> 10) & 1) != 0)
402 }
403 #[doc = "Bit 11 - Receive Pending Interrupt Enable"]
404 #[inline(always)]
405 pub fn rxpend(&self) -> RxpendR {
406 RxpendR::new(((self.bits >> 11) & 1) != 0)
407 }
408 #[doc = "Bit 12 - Transmit Buffer/FIFO Not Full Interrupt Enable"]
409 #[inline(always)]
410 pub fn txnotfull(&self) -> TxnotfullR {
411 TxnotfullR::new(((self.bits >> 12) & 1) != 0)
412 }
413 #[doc = "Bit 13 - IBI Won Interrupt Enable"]
414 #[inline(always)]
415 pub fn ibiwon(&self) -> IbiwonR {
416 IbiwonR::new(((self.bits >> 13) & 1) != 0)
417 }
418 #[doc = "Bit 15 - Error or Warning (ERRWARN) Interrupt Enable"]
419 #[inline(always)]
420 pub fn errwarn(&self) -> ErrwarnR {
421 ErrwarnR::new(((self.bits >> 15) & 1) != 0)
422 }
423 #[doc = "Bit 19 - Now Controller Interrupt Enable"]
424 #[inline(always)]
425 pub fn nowmaster(&self) -> NowmasterR {
426 NowmasterR::new(((self.bits >> 19) & 1) != 0)
427 }
428}
429#[cfg(feature = "debug")]
430impl core::fmt::Debug for R {
431 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
432 f.debug_struct("MINTSET")
433 .field("slvstart", &self.slvstart())
434 .field("mctrldone", &self.mctrldone())
435 .field("complete", &self.complete())
436 .field("rxpend", &self.rxpend())
437 .field("txnotfull", &self.txnotfull())
438 .field("ibiwon", &self.ibiwon())
439 .field("errwarn", &self.errwarn())
440 .field("nowmaster", &self.nowmaster())
441 .finish()
442 }
443}
444impl W {
445 #[doc = "Bit 8 - Target Start Interrupt Enable"]
446 #[inline(always)]
447 pub fn slvstart(&mut self) -> SlvstartW<'_, MintsetSpec> {
448 SlvstartW::new(self, 8)
449 }
450 #[doc = "Bit 9 - Controller Control Done Interrupt Enable"]
451 #[inline(always)]
452 pub fn mctrldone(&mut self) -> MctrldoneW<'_, MintsetSpec> {
453 MctrldoneW::new(self, 9)
454 }
455 #[doc = "Bit 10 - Completed Message Interrupt Enable"]
456 #[inline(always)]
457 pub fn complete(&mut self) -> CompleteW<'_, MintsetSpec> {
458 CompleteW::new(self, 10)
459 }
460 #[doc = "Bit 11 - Receive Pending Interrupt Enable"]
461 #[inline(always)]
462 pub fn rxpend(&mut self) -> RxpendW<'_, MintsetSpec> {
463 RxpendW::new(self, 11)
464 }
465 #[doc = "Bit 12 - Transmit Buffer/FIFO Not Full Interrupt Enable"]
466 #[inline(always)]
467 pub fn txnotfull(&mut self) -> TxnotfullW<'_, MintsetSpec> {
468 TxnotfullW::new(self, 12)
469 }
470 #[doc = "Bit 13 - IBI Won Interrupt Enable"]
471 #[inline(always)]
472 pub fn ibiwon(&mut self) -> IbiwonW<'_, MintsetSpec> {
473 IbiwonW::new(self, 13)
474 }
475 #[doc = "Bit 15 - Error or Warning (ERRWARN) Interrupt Enable"]
476 #[inline(always)]
477 pub fn errwarn(&mut self) -> ErrwarnW<'_, MintsetSpec> {
478 ErrwarnW::new(self, 15)
479 }
480 #[doc = "Bit 19 - Now Controller Interrupt Enable"]
481 #[inline(always)]
482 pub fn nowmaster(&mut self) -> NowmasterW<'_, MintsetSpec> {
483 NowmasterW::new(self, 19)
484 }
485}
486#[doc = "Controller Interrupt Set\n\nYou can [`read`](crate::Reg::read) this register and get [`mintset::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mintset::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
487pub struct MintsetSpec;
488impl crate::RegisterSpec for MintsetSpec {
489 type Ux = u32;
490}
491#[doc = "`read()` method returns [`mintset::R`](R) reader structure"]
492impl crate::Readable for MintsetSpec {}
493#[doc = "`write(|w| ..)` method takes [`mintset::W`](W) writer structure"]
494impl crate::Writable for MintsetSpec {
495 type Safety = crate::Unsafe;
496 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x0008_bf00;
497}
498#[doc = "`reset()` method sets MINTSET to value 0"]
499impl crate::Resettable for MintsetSpec {}