efm32g230_pac/timer0/
if_.rs1#[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 `OF` reader - Overflow Interrupt Flag"]
17pub type OF_R = crate::BitReader<bool>;
18#[doc = "Field `UF` reader - Underflow Interrupt Flag"]
19pub type UF_R = crate::BitReader<bool>;
20#[doc = "Field `CC0` reader - CC Channel 0 Interrupt Flag"]
21pub type CC0_R = crate::BitReader<bool>;
22#[doc = "Field `CC1` reader - CC Channel 1 Interrupt Flag"]
23pub type CC1_R = crate::BitReader<bool>;
24#[doc = "Field `CC2` reader - CC Channel 2 Interrupt Flag"]
25pub type CC2_R = crate::BitReader<bool>;
26#[doc = "Field `ICBOF0` reader - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag"]
27pub type ICBOF0_R = crate::BitReader<bool>;
28#[doc = "Field `ICBOF1` reader - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag"]
29pub type ICBOF1_R = crate::BitReader<bool>;
30#[doc = "Field `ICBOF2` reader - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag"]
31pub type ICBOF2_R = crate::BitReader<bool>;
32impl R {
33 #[doc = "Bit 0 - Overflow Interrupt Flag"]
34 #[inline(always)]
35 pub fn of(&self) -> OF_R {
36 OF_R::new((self.bits & 1) != 0)
37 }
38 #[doc = "Bit 1 - Underflow Interrupt Flag"]
39 #[inline(always)]
40 pub fn uf(&self) -> UF_R {
41 UF_R::new(((self.bits >> 1) & 1) != 0)
42 }
43 #[doc = "Bit 4 - CC Channel 0 Interrupt Flag"]
44 #[inline(always)]
45 pub fn cc0(&self) -> CC0_R {
46 CC0_R::new(((self.bits >> 4) & 1) != 0)
47 }
48 #[doc = "Bit 5 - CC Channel 1 Interrupt Flag"]
49 #[inline(always)]
50 pub fn cc1(&self) -> CC1_R {
51 CC1_R::new(((self.bits >> 5) & 1) != 0)
52 }
53 #[doc = "Bit 6 - CC Channel 2 Interrupt Flag"]
54 #[inline(always)]
55 pub fn cc2(&self) -> CC2_R {
56 CC2_R::new(((self.bits >> 6) & 1) != 0)
57 }
58 #[doc = "Bit 8 - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag"]
59 #[inline(always)]
60 pub fn icbof0(&self) -> ICBOF0_R {
61 ICBOF0_R::new(((self.bits >> 8) & 1) != 0)
62 }
63 #[doc = "Bit 9 - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag"]
64 #[inline(always)]
65 pub fn icbof1(&self) -> ICBOF1_R {
66 ICBOF1_R::new(((self.bits >> 9) & 1) != 0)
67 }
68 #[doc = "Bit 10 - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag"]
69 #[inline(always)]
70 pub fn icbof2(&self) -> ICBOF2_R {
71 ICBOF2_R::new(((self.bits >> 10) & 1) != 0)
72 }
73}
74#[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"]
75pub struct IF_SPEC;
76impl crate::RegisterSpec for IF_SPEC {
77 type Ux = u32;
78}
79#[doc = "`read()` method returns [if_::R](R) reader structure"]
80impl crate::Readable for IF_SPEC {
81 type Reader = R;
82}
83#[doc = "`reset()` method sets IF to value 0"]
84impl crate::Resettable for IF_SPEC {
85 #[inline(always)]
86 fn reset_value() -> Self::Ux {
87 0
88 }
89}