efm32pg1b200_pac/adc0/
ifs.rs

1#[doc = "Register `IFS` writer"]
2pub struct W(crate::W<IFS_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<IFS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl core::ops::DerefMut for W {
11    #[inline(always)]
12    fn deref_mut(&mut self) -> &mut Self::Target {
13        &mut self.0
14    }
15}
16impl From<crate::W<IFS_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<IFS_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `SINGLEOF` writer - Set SINGLEOF Interrupt Flag"]
23pub type SINGLEOF_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 8>;
24#[doc = "Field `SCANOF` writer - Set SCANOF Interrupt Flag"]
25pub type SCANOF_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 9>;
26#[doc = "Field `SINGLEUF` writer - Set SINGLEUF Interrupt Flag"]
27pub type SINGLEUF_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 10>;
28#[doc = "Field `SCANUF` writer - Set SCANUF Interrupt Flag"]
29pub type SCANUF_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 11>;
30#[doc = "Field `SINGLECMP` writer - Set SINGLECMP Interrupt Flag"]
31pub type SINGLECMP_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 16>;
32#[doc = "Field `SCANCMP` writer - Set SCANCMP Interrupt Flag"]
33pub type SCANCMP_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 17>;
34#[doc = "Field `VREFOV` writer - Set VREFOV Interrupt Flag"]
35pub type VREFOV_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 24>;
36#[doc = "Field `PROGERR` writer - Set PROGERR Interrupt Flag"]
37pub type PROGERR_W<'a> = crate::BitWriter<'a, u32, IFS_SPEC, bool, 25>;
38impl W {
39    #[doc = "Bit 8 - Set SINGLEOF Interrupt Flag"]
40    #[inline(always)]
41    pub fn singleof(&mut self) -> SINGLEOF_W {
42        SINGLEOF_W::new(self)
43    }
44    #[doc = "Bit 9 - Set SCANOF Interrupt Flag"]
45    #[inline(always)]
46    pub fn scanof(&mut self) -> SCANOF_W {
47        SCANOF_W::new(self)
48    }
49    #[doc = "Bit 10 - Set SINGLEUF Interrupt Flag"]
50    #[inline(always)]
51    pub fn singleuf(&mut self) -> SINGLEUF_W {
52        SINGLEUF_W::new(self)
53    }
54    #[doc = "Bit 11 - Set SCANUF Interrupt Flag"]
55    #[inline(always)]
56    pub fn scanuf(&mut self) -> SCANUF_W {
57        SCANUF_W::new(self)
58    }
59    #[doc = "Bit 16 - Set SINGLECMP Interrupt Flag"]
60    #[inline(always)]
61    pub fn singlecmp(&mut self) -> SINGLECMP_W {
62        SINGLECMP_W::new(self)
63    }
64    #[doc = "Bit 17 - Set SCANCMP Interrupt Flag"]
65    #[inline(always)]
66    pub fn scancmp(&mut self) -> SCANCMP_W {
67        SCANCMP_W::new(self)
68    }
69    #[doc = "Bit 24 - Set VREFOV Interrupt Flag"]
70    #[inline(always)]
71    pub fn vrefov(&mut self) -> VREFOV_W {
72        VREFOV_W::new(self)
73    }
74    #[doc = "Bit 25 - Set PROGERR Interrupt Flag"]
75    #[inline(always)]
76    pub fn progerr(&mut self) -> PROGERR_W {
77        PROGERR_W::new(self)
78    }
79    #[doc = "Writes raw bits to the register."]
80    #[inline(always)]
81    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
82        self.0.bits(bits);
83        self
84    }
85}
86#[doc = "Interrupt Flag Set Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ifs](index.html) module"]
87pub struct IFS_SPEC;
88impl crate::RegisterSpec for IFS_SPEC {
89    type Ux = u32;
90}
91#[doc = "`write(|w| ..)` method takes [ifs::W](W) writer structure"]
92impl crate::Writable for IFS_SPEC {
93    type Writer = W;
94}
95#[doc = "`reset()` method sets IFS to value 0"]
96impl crate::Resettable for IFS_SPEC {
97    #[inline(always)]
98    fn reset_value() -> Self::Ux {
99        0
100    }
101}