efm32gg12b810_pac/adc1/
if_.rs

1#[doc = "Register `IF` reader"]
2pub struct R(crate::R<IF_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<IF_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<IF_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<IF_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `SINGLE` reader - Single Conversion Complete Interrupt Flag"]
17pub type SINGLE_R = crate::BitReader<bool>;
18#[doc = "Field `SCAN` reader - Scan Conversion Complete Interrupt Flag"]
19pub type SCAN_R = crate::BitReader<bool>;
20#[doc = "Field `SINGLEOF` reader - Single FIFO Overflow Interrupt Flag"]
21pub type SINGLEOF_R = crate::BitReader<bool>;
22#[doc = "Field `SCANOF` reader - Scan FIFO Overflow Interrupt Flag"]
23pub type SCANOF_R = crate::BitReader<bool>;
24#[doc = "Field `SINGLEUF` reader - Single FIFO Underflow Interrupt Flag"]
25pub type SINGLEUF_R = crate::BitReader<bool>;
26#[doc = "Field `SCANUF` reader - Scan FIFO Underflow Interrupt Flag"]
27pub type SCANUF_R = crate::BitReader<bool>;
28#[doc = "Field `SINGLECMP` reader - Single Result Compare Match Interrupt Flag"]
29pub type SINGLECMP_R = crate::BitReader<bool>;
30#[doc = "Field `SCANCMP` reader - Scan Result Compare Match Interrupt Flag"]
31pub type SCANCMP_R = crate::BitReader<bool>;
32#[doc = "Field `VREFOV` reader - VREF Over Voltage Interrupt Flag"]
33pub type VREFOV_R = crate::BitReader<bool>;
34#[doc = "Field `PROGERR` reader - Programming Error Interrupt Flag"]
35pub type PROGERR_R = crate::BitReader<bool>;
36#[doc = "Field `SCANEXTPEND` reader - External Scan Trigger Pending Flag"]
37pub type SCANEXTPEND_R = crate::BitReader<bool>;
38#[doc = "Field `SCANPEND` reader - Scan Trigger Pending Flag"]
39pub type SCANPEND_R = crate::BitReader<bool>;
40#[doc = "Field `PRSTIMEDERR` reader - PRS Timed Mode Error Flag"]
41pub type PRSTIMEDERR_R = crate::BitReader<bool>;
42#[doc = "Field `EM23ERR` reader - EM23 Entry Error Flag"]
43pub type EM23ERR_R = crate::BitReader<bool>;
44impl R {
45    #[doc = "Bit 0 - Single Conversion Complete Interrupt Flag"]
46    #[inline(always)]
47    pub fn single(&self) -> SINGLE_R {
48        SINGLE_R::new((self.bits & 1) != 0)
49    }
50    #[doc = "Bit 1 - Scan Conversion Complete Interrupt Flag"]
51    #[inline(always)]
52    pub fn scan(&self) -> SCAN_R {
53        SCAN_R::new(((self.bits >> 1) & 1) != 0)
54    }
55    #[doc = "Bit 8 - Single FIFO Overflow Interrupt Flag"]
56    #[inline(always)]
57    pub fn singleof(&self) -> SINGLEOF_R {
58        SINGLEOF_R::new(((self.bits >> 8) & 1) != 0)
59    }
60    #[doc = "Bit 9 - Scan FIFO Overflow Interrupt Flag"]
61    #[inline(always)]
62    pub fn scanof(&self) -> SCANOF_R {
63        SCANOF_R::new(((self.bits >> 9) & 1) != 0)
64    }
65    #[doc = "Bit 10 - Single FIFO Underflow Interrupt Flag"]
66    #[inline(always)]
67    pub fn singleuf(&self) -> SINGLEUF_R {
68        SINGLEUF_R::new(((self.bits >> 10) & 1) != 0)
69    }
70    #[doc = "Bit 11 - Scan FIFO Underflow Interrupt Flag"]
71    #[inline(always)]
72    pub fn scanuf(&self) -> SCANUF_R {
73        SCANUF_R::new(((self.bits >> 11) & 1) != 0)
74    }
75    #[doc = "Bit 16 - Single Result Compare Match Interrupt Flag"]
76    #[inline(always)]
77    pub fn singlecmp(&self) -> SINGLECMP_R {
78        SINGLECMP_R::new(((self.bits >> 16) & 1) != 0)
79    }
80    #[doc = "Bit 17 - Scan Result Compare Match Interrupt Flag"]
81    #[inline(always)]
82    pub fn scancmp(&self) -> SCANCMP_R {
83        SCANCMP_R::new(((self.bits >> 17) & 1) != 0)
84    }
85    #[doc = "Bit 24 - VREF Over Voltage Interrupt Flag"]
86    #[inline(always)]
87    pub fn vrefov(&self) -> VREFOV_R {
88        VREFOV_R::new(((self.bits >> 24) & 1) != 0)
89    }
90    #[doc = "Bit 25 - Programming Error Interrupt Flag"]
91    #[inline(always)]
92    pub fn progerr(&self) -> PROGERR_R {
93        PROGERR_R::new(((self.bits >> 25) & 1) != 0)
94    }
95    #[doc = "Bit 26 - External Scan Trigger Pending Flag"]
96    #[inline(always)]
97    pub fn scanextpend(&self) -> SCANEXTPEND_R {
98        SCANEXTPEND_R::new(((self.bits >> 26) & 1) != 0)
99    }
100    #[doc = "Bit 27 - Scan Trigger Pending Flag"]
101    #[inline(always)]
102    pub fn scanpend(&self) -> SCANPEND_R {
103        SCANPEND_R::new(((self.bits >> 27) & 1) != 0)
104    }
105    #[doc = "Bit 28 - PRS Timed Mode Error Flag"]
106    #[inline(always)]
107    pub fn prstimederr(&self) -> PRSTIMEDERR_R {
108        PRSTIMEDERR_R::new(((self.bits >> 28) & 1) != 0)
109    }
110    #[doc = "Bit 29 - EM23 Entry Error Flag"]
111    #[inline(always)]
112    pub fn em23err(&self) -> EM23ERR_R {
113        EM23ERR_R::new(((self.bits >> 29) & 1) != 0)
114    }
115}
116#[doc = "Interrupt Flag Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [if_](index.html) module"]
117pub struct IF_SPEC;
118impl crate::RegisterSpec for IF_SPEC {
119    type Ux = u32;
120}
121#[doc = "`read()` method returns [if_::R](R) reader structure"]
122impl crate::Readable for IF_SPEC {
123    type Reader = R;
124}
125#[doc = "`reset()` method sets IF to value 0"]
126impl crate::Resettable for IF_SPEC {
127    #[inline(always)]
128    fn reset_value() -> Self::Ux {
129        0
130    }
131}