efm32gg_pac/efm32gg995/timer0/
ifc.rs

1#[doc = "Register `IFC` writer"]
2pub struct W(crate::W<IFC_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<IFC_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<IFC_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<IFC_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `OF` writer - Overflow Interrupt Flag Clear"]
23pub type OF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
24#[doc = "Field `UF` writer - Underflow Interrupt Flag Clear"]
25pub type UF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
26#[doc = "Field `CC0` writer - CC Channel 0 Interrupt Flag Clear"]
27pub type CC0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
28#[doc = "Field `CC1` writer - CC Channel 1 Interrupt Flag Clear"]
29pub type CC1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
30#[doc = "Field `CC2` writer - CC Channel 2 Interrupt Flag Clear"]
31pub type CC2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
32#[doc = "Field `ICBOF0` writer - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag Clear"]
33pub type ICBOF0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
34#[doc = "Field `ICBOF1` writer - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag Clear"]
35pub type ICBOF1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
36#[doc = "Field `ICBOF2` writer - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag Clear"]
37pub type ICBOF2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IFC_SPEC, bool, O>;
38impl W {
39    #[doc = "Bit 0 - Overflow Interrupt Flag Clear"]
40    #[inline(always)]
41    #[must_use]
42    pub fn of(&mut self) -> OF_W<0> {
43        OF_W::new(self)
44    }
45    #[doc = "Bit 1 - Underflow Interrupt Flag Clear"]
46    #[inline(always)]
47    #[must_use]
48    pub fn uf(&mut self) -> UF_W<1> {
49        UF_W::new(self)
50    }
51    #[doc = "Bit 4 - CC Channel 0 Interrupt Flag Clear"]
52    #[inline(always)]
53    #[must_use]
54    pub fn cc0(&mut self) -> CC0_W<4> {
55        CC0_W::new(self)
56    }
57    #[doc = "Bit 5 - CC Channel 1 Interrupt Flag Clear"]
58    #[inline(always)]
59    #[must_use]
60    pub fn cc1(&mut self) -> CC1_W<5> {
61        CC1_W::new(self)
62    }
63    #[doc = "Bit 6 - CC Channel 2 Interrupt Flag Clear"]
64    #[inline(always)]
65    #[must_use]
66    pub fn cc2(&mut self) -> CC2_W<6> {
67        CC2_W::new(self)
68    }
69    #[doc = "Bit 8 - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag Clear"]
70    #[inline(always)]
71    #[must_use]
72    pub fn icbof0(&mut self) -> ICBOF0_W<8> {
73        ICBOF0_W::new(self)
74    }
75    #[doc = "Bit 9 - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag Clear"]
76    #[inline(always)]
77    #[must_use]
78    pub fn icbof1(&mut self) -> ICBOF1_W<9> {
79        ICBOF1_W::new(self)
80    }
81    #[doc = "Bit 10 - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag Clear"]
82    #[inline(always)]
83    #[must_use]
84    pub fn icbof2(&mut self) -> ICBOF2_W<10> {
85        ICBOF2_W::new(self)
86    }
87    #[doc = "Writes raw bits to the register."]
88    #[inline(always)]
89    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
90        self.0.bits(bits);
91        self
92    }
93}
94#[doc = "Interrupt Flag Clear 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 [ifc](index.html) module"]
95pub struct IFC_SPEC;
96impl crate::RegisterSpec for IFC_SPEC {
97    type Ux = u32;
98}
99#[doc = "`write(|w| ..)` method takes [ifc::W](W) writer structure"]
100impl crate::Writable for IFC_SPEC {
101    type Writer = W;
102    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
103    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
104}
105#[doc = "`reset()` method sets IFC to value 0"]
106impl crate::Resettable for IFC_SPEC {
107    const RESET_VALUE: Self::Ux = 0;
108}