Skip to main content

mcxa_pac/i3c0/
mintclr.rs

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