mimxrt685s_pac/dma0/
intstat.rs1#[doc = "Register `INTSTAT` reader"]
2pub type R = crate::R<IntstatSpec>;
3#[doc = "Summarizes whether any enabled interrupts (other than error interrupts) are pending.\n\nValue on reset: 0"]
4#[cfg_attr(feature = "defmt", derive(defmt::Format))]
5#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6pub enum Activeint {
7 #[doc = "0: Not pending. No enabled interrupts are pending."]
8 NotPending = 0,
9 #[doc = "1: Pending. At least one enabled interrupt is pending."]
10 Pending = 1,
11}
12impl From<Activeint> for bool {
13 #[inline(always)]
14 fn from(variant: Activeint) -> Self {
15 variant as u8 != 0
16 }
17}
18#[doc = "Field `ACTIVEINT` reader - Summarizes whether any enabled interrupts (other than error interrupts) are pending."]
19pub type ActiveintR = crate::BitReader<Activeint>;
20impl ActiveintR {
21 #[doc = "Get enumerated values variant"]
22 #[inline(always)]
23 pub const fn variant(&self) -> Activeint {
24 match self.bits {
25 false => Activeint::NotPending,
26 true => Activeint::Pending,
27 }
28 }
29 #[doc = "Not pending. No enabled interrupts are pending."]
30 #[inline(always)]
31 pub fn is_not_pending(&self) -> bool {
32 *self == Activeint::NotPending
33 }
34 #[doc = "Pending. At least one enabled interrupt is pending."]
35 #[inline(always)]
36 pub fn is_pending(&self) -> bool {
37 *self == Activeint::Pending
38 }
39}
40#[doc = "Summarizes whether any error interrupts are pending.\n\nValue on reset: 0"]
41#[cfg_attr(feature = "defmt", derive(defmt::Format))]
42#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum Activeerrint {
44 #[doc = "0: Not pending. No error interrupts are pending."]
45 NotPending = 0,
46 #[doc = "1: Pending. At least one error interrupt is pending."]
47 Pending = 1,
48}
49impl From<Activeerrint> for bool {
50 #[inline(always)]
51 fn from(variant: Activeerrint) -> Self {
52 variant as u8 != 0
53 }
54}
55#[doc = "Field `ACTIVEERRINT` reader - Summarizes whether any error interrupts are pending."]
56pub type ActiveerrintR = crate::BitReader<Activeerrint>;
57impl ActiveerrintR {
58 #[doc = "Get enumerated values variant"]
59 #[inline(always)]
60 pub const fn variant(&self) -> Activeerrint {
61 match self.bits {
62 false => Activeerrint::NotPending,
63 true => Activeerrint::Pending,
64 }
65 }
66 #[doc = "Not pending. No error interrupts are pending."]
67 #[inline(always)]
68 pub fn is_not_pending(&self) -> bool {
69 *self == Activeerrint::NotPending
70 }
71 #[doc = "Pending. At least one error interrupt is pending."]
72 #[inline(always)]
73 pub fn is_pending(&self) -> bool {
74 *self == Activeerrint::Pending
75 }
76}
77impl R {
78 #[doc = "Bit 1 - Summarizes whether any enabled interrupts (other than error interrupts) are pending."]
79 #[inline(always)]
80 pub fn activeint(&self) -> ActiveintR {
81 ActiveintR::new(((self.bits >> 1) & 1) != 0)
82 }
83 #[doc = "Bit 2 - Summarizes whether any error interrupts are pending."]
84 #[inline(always)]
85 pub fn activeerrint(&self) -> ActiveerrintR {
86 ActiveerrintR::new(((self.bits >> 2) & 1) != 0)
87 }
88}
89#[cfg(feature = "debug")]
90impl core::fmt::Debug for R {
91 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
92 f.debug_struct("INTSTAT")
93 .field("activeint", &self.activeint())
94 .field("activeerrint", &self.activeerrint())
95 .finish()
96 }
97}
98#[doc = "Interrupt status.\n\nYou can [`read`](crate::Reg::read) this register and get [`intstat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
99pub struct IntstatSpec;
100impl crate::RegisterSpec for IntstatSpec {
101 type Ux = u32;
102}
103#[doc = "`read()` method returns [`intstat::R`](R) reader structure"]
104impl crate::Readable for IntstatSpec {}
105#[doc = "`reset()` method sets INTSTAT to value 0"]
106impl crate::Resettable for IntstatSpec {
107 const RESET_VALUE: u32 = 0;
108}