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 `OF` reader - Overflow Interrupt Flag"]
17pub type OF_R = crate::BitReader<bool>;
18#[doc = "Field `COMP0` reader - Compare Match 0 Interrupt Flag"]
19pub type COMP0_R = crate::BitReader<bool>;
20#[doc = "Field `COMP1` reader - Compare Match 1 Interrupt Flag"]
21pub type COMP1_R = crate::BitReader<bool>;
22impl R {
23 #[doc = "Bit 0 - Overflow Interrupt Flag"]
24 #[inline(always)]
25 pub fn of(&self) -> OF_R {
26 OF_R::new((self.bits & 1) != 0)
27 }
28 #[doc = "Bit 1 - Compare Match 0 Interrupt Flag"]
29 #[inline(always)]
30 pub fn comp0(&self) -> COMP0_R {
31 COMP0_R::new(((self.bits >> 1) & 1) != 0)
32 }
33 #[doc = "Bit 2 - Compare Match 1 Interrupt Flag"]
34 #[inline(always)]
35 pub fn comp1(&self) -> COMP1_R {
36 COMP1_R::new(((self.bits >> 2) & 1) != 0)
37 }
38}
39#[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"]
40pub struct IF_SPEC;
41impl crate::RegisterSpec for IF_SPEC {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [if_::R](R) reader structure"]
45impl crate::Readable for IF_SPEC {
46 type Reader = R;
47}
48#[doc = "`reset()` method sets IF to value 0"]
49impl crate::Resettable for IF_SPEC {
50 #[inline(always)]
51 fn reset_value() -> Self::Ux {
52 0
53 }
54}