efm32gg12b830_pac/ebi/
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 `VSYNC` reader - Vertical Sync Interrupt Flag"]
17pub type VSYNC_R = crate::BitReader<bool>;
18#[doc = "Field `HSYNC` reader - Horizontal Sync Interrupt Flag"]
19pub type HSYNC_R = crate::BitReader<bool>;
20#[doc = "Field `VBPORCH` reader - Vertical Back Porch Interrupt Flag"]
21pub type VBPORCH_R = crate::BitReader<bool>;
22#[doc = "Field `VFPORCH` reader - Vertical Front Porch Interrupt Flag"]
23pub type VFPORCH_R = crate::BitReader<bool>;
24#[doc = "Field `DDEMPTY` reader - Direct Drive Data Empty Interrupt Flag"]
25pub type DDEMPTY_R = crate::BitReader<bool>;
26#[doc = "Field `DDJIT` reader - Direct Drive Jitter Interrupt Flag"]
27pub type DDJIT_R = crate::BitReader<bool>;
28#[doc = "Field `TFTPIXEL0EMPTY` reader - EBI_TFTPIXEL0 is Empty Interrupt Flag"]
29pub type TFTPIXEL0EMPTY_R = crate::BitReader<bool>;
30#[doc = "Field `TFTPIXEL1EMPTY` reader - EBI_TFTPIXEL1 is Empty Interrupt Flag"]
31pub type TFTPIXEL1EMPTY_R = crate::BitReader<bool>;
32#[doc = "Field `TFTPIXELFULL` reader - EBI_TFTPIXEL is Full Interrupt Flag"]
33pub type TFTPIXELFULL_R = crate::BitReader<bool>;
34#[doc = "Field `TFTPIXELOF` reader - EBI_TFTPIXEL Register Overflow Interrupt Flag"]
35pub type TFTPIXELOF_R = crate::BitReader<bool>;
36impl R {
37    #[doc = "Bit 0 - Vertical Sync Interrupt Flag"]
38    #[inline(always)]
39    pub fn vsync(&self) -> VSYNC_R {
40        VSYNC_R::new((self.bits & 1) != 0)
41    }
42    #[doc = "Bit 1 - Horizontal Sync Interrupt Flag"]
43    #[inline(always)]
44    pub fn hsync(&self) -> HSYNC_R {
45        HSYNC_R::new(((self.bits >> 1) & 1) != 0)
46    }
47    #[doc = "Bit 2 - Vertical Back Porch Interrupt Flag"]
48    #[inline(always)]
49    pub fn vbporch(&self) -> VBPORCH_R {
50        VBPORCH_R::new(((self.bits >> 2) & 1) != 0)
51    }
52    #[doc = "Bit 3 - Vertical Front Porch Interrupt Flag"]
53    #[inline(always)]
54    pub fn vfporch(&self) -> VFPORCH_R {
55        VFPORCH_R::new(((self.bits >> 3) & 1) != 0)
56    }
57    #[doc = "Bit 4 - Direct Drive Data Empty Interrupt Flag"]
58    #[inline(always)]
59    pub fn ddempty(&self) -> DDEMPTY_R {
60        DDEMPTY_R::new(((self.bits >> 4) & 1) != 0)
61    }
62    #[doc = "Bit 5 - Direct Drive Jitter Interrupt Flag"]
63    #[inline(always)]
64    pub fn ddjit(&self) -> DDJIT_R {
65        DDJIT_R::new(((self.bits >> 5) & 1) != 0)
66    }
67    #[doc = "Bit 6 - EBI_TFTPIXEL0 is Empty Interrupt Flag"]
68    #[inline(always)]
69    pub fn tftpixel0empty(&self) -> TFTPIXEL0EMPTY_R {
70        TFTPIXEL0EMPTY_R::new(((self.bits >> 6) & 1) != 0)
71    }
72    #[doc = "Bit 7 - EBI_TFTPIXEL1 is Empty Interrupt Flag"]
73    #[inline(always)]
74    pub fn tftpixel1empty(&self) -> TFTPIXEL1EMPTY_R {
75        TFTPIXEL1EMPTY_R::new(((self.bits >> 7) & 1) != 0)
76    }
77    #[doc = "Bit 8 - EBI_TFTPIXEL is Full Interrupt Flag"]
78    #[inline(always)]
79    pub fn tftpixelfull(&self) -> TFTPIXELFULL_R {
80        TFTPIXELFULL_R::new(((self.bits >> 8) & 1) != 0)
81    }
82    #[doc = "Bit 9 - EBI_TFTPIXEL Register Overflow Interrupt Flag"]
83    #[inline(always)]
84    pub fn tftpixelof(&self) -> TFTPIXELOF_R {
85        TFTPIXELOF_R::new(((self.bits >> 9) & 1) != 0)
86    }
87}
88#[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"]
89pub struct IF_SPEC;
90impl crate::RegisterSpec for IF_SPEC {
91    type Ux = u32;
92}
93#[doc = "`read()` method returns [if_::R](R) reader structure"]
94impl crate::Readable for IF_SPEC {
95    type Reader = R;
96}
97#[doc = "`reset()` method sets IF to value 0"]
98impl crate::Resettable for IF_SPEC {
99    #[inline(always)]
100    fn reset_value() -> Self::Ux {
101        0
102    }
103}