gd32e5/gd32e508/shrtimer_common/
intf.rs

1#[doc = "Register `INTF` reader"]
2pub type R = crate::R<IntfSpec>;
3#[doc = "Field `FLT0IF` reader - Fault 0 interrupt flag"]
4pub type Flt0ifR = crate::BitReader;
5#[doc = "Field `FLT1IF` reader - Fault 1 interrupt flag"]
6pub type Flt1ifR = crate::BitReader;
7#[doc = "Field `FLT2IF` reader - Fault 2 interrupt flag"]
8pub type Flt2ifR = crate::BitReader;
9#[doc = "Field `FLT3IF` reader - Fault 3 interrupt flag"]
10pub type Flt3ifR = crate::BitReader;
11#[doc = "Field `FLT4IF` reader - Fault 4 interrupt flag"]
12pub type Flt4ifR = crate::BitReader;
13#[doc = "Field `SYSFLTIF` reader - System fault interrupt flag"]
14pub type SysfltifR = crate::BitReader;
15#[doc = "Field `DLLCALIF` reader - DLL calibration completed interrupt flag"]
16pub type DllcalifR = crate::BitReader;
17#[doc = "Field `BMPERIF` reader - Bunch mode period interrupt flag"]
18pub type BmperifR = crate::BitReader;
19impl R {
20    #[doc = "Bit 0 - Fault 0 interrupt flag"]
21    #[inline(always)]
22    pub fn flt0if(&self) -> Flt0ifR {
23        Flt0ifR::new((self.bits & 1) != 0)
24    }
25    #[doc = "Bit 1 - Fault 1 interrupt flag"]
26    #[inline(always)]
27    pub fn flt1if(&self) -> Flt1ifR {
28        Flt1ifR::new(((self.bits >> 1) & 1) != 0)
29    }
30    #[doc = "Bit 2 - Fault 2 interrupt flag"]
31    #[inline(always)]
32    pub fn flt2if(&self) -> Flt2ifR {
33        Flt2ifR::new(((self.bits >> 2) & 1) != 0)
34    }
35    #[doc = "Bit 3 - Fault 3 interrupt flag"]
36    #[inline(always)]
37    pub fn flt3if(&self) -> Flt3ifR {
38        Flt3ifR::new(((self.bits >> 3) & 1) != 0)
39    }
40    #[doc = "Bit 4 - Fault 4 interrupt flag"]
41    #[inline(always)]
42    pub fn flt4if(&self) -> Flt4ifR {
43        Flt4ifR::new(((self.bits >> 4) & 1) != 0)
44    }
45    #[doc = "Bit 5 - System fault interrupt flag"]
46    #[inline(always)]
47    pub fn sysfltif(&self) -> SysfltifR {
48        SysfltifR::new(((self.bits >> 5) & 1) != 0)
49    }
50    #[doc = "Bit 16 - DLL calibration completed interrupt flag"]
51    #[inline(always)]
52    pub fn dllcalif(&self) -> DllcalifR {
53        DllcalifR::new(((self.bits >> 16) & 1) != 0)
54    }
55    #[doc = "Bit 17 - Bunch mode period interrupt flag"]
56    #[inline(always)]
57    pub fn bmperif(&self) -> BmperifR {
58        BmperifR::new(((self.bits >> 17) & 1) != 0)
59    }
60}
61#[doc = "SHRTIMER interrupt flag register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`intf::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
62pub struct IntfSpec;
63impl crate::RegisterSpec for IntfSpec {
64    type Ux = u32;
65}
66#[doc = "`read()` method returns [`intf::R`](R) reader structure"]
67impl crate::Readable for IntfSpec {}
68#[doc = "`reset()` method sets INTF to value 0"]
69impl crate::Resettable for IntfSpec {
70    const RESET_VALUE: u32 = 0;
71}