atsam3n2c/tc0/
imr0.rs

1#[doc = "Register `IMR0` reader"]
2pub type R = crate::R<Imr0Spec>;
3#[doc = "Field `COVFS` reader - Counter Overflow"]
4pub type CovfsR = crate::BitReader;
5#[doc = "Field `LOVRS` reader - Load Overrun"]
6pub type LovrsR = crate::BitReader;
7#[doc = "Field `CPAS` reader - RA Compare"]
8pub type CpasR = crate::BitReader;
9#[doc = "Field `CPBS` reader - RB Compare"]
10pub type CpbsR = crate::BitReader;
11#[doc = "Field `CPCS` reader - RC Compare"]
12pub type CpcsR = crate::BitReader;
13#[doc = "Field `LDRAS` reader - RA Loading"]
14pub type LdrasR = crate::BitReader;
15#[doc = "Field `LDRBS` reader - RB Loading"]
16pub type LdrbsR = crate::BitReader;
17#[doc = "Field `ETRGS` reader - External Trigger"]
18pub type EtrgsR = crate::BitReader;
19impl R {
20    #[doc = "Bit 0 - Counter Overflow"]
21    #[inline(always)]
22    pub fn covfs(&self) -> CovfsR {
23        CovfsR::new((self.bits & 1) != 0)
24    }
25    #[doc = "Bit 1 - Load Overrun"]
26    #[inline(always)]
27    pub fn lovrs(&self) -> LovrsR {
28        LovrsR::new(((self.bits >> 1) & 1) != 0)
29    }
30    #[doc = "Bit 2 - RA Compare"]
31    #[inline(always)]
32    pub fn cpas(&self) -> CpasR {
33        CpasR::new(((self.bits >> 2) & 1) != 0)
34    }
35    #[doc = "Bit 3 - RB Compare"]
36    #[inline(always)]
37    pub fn cpbs(&self) -> CpbsR {
38        CpbsR::new(((self.bits >> 3) & 1) != 0)
39    }
40    #[doc = "Bit 4 - RC Compare"]
41    #[inline(always)]
42    pub fn cpcs(&self) -> CpcsR {
43        CpcsR::new(((self.bits >> 4) & 1) != 0)
44    }
45    #[doc = "Bit 5 - RA Loading"]
46    #[inline(always)]
47    pub fn ldras(&self) -> LdrasR {
48        LdrasR::new(((self.bits >> 5) & 1) != 0)
49    }
50    #[doc = "Bit 6 - RB Loading"]
51    #[inline(always)]
52    pub fn ldrbs(&self) -> LdrbsR {
53        LdrbsR::new(((self.bits >> 6) & 1) != 0)
54    }
55    #[doc = "Bit 7 - External Trigger"]
56    #[inline(always)]
57    pub fn etrgs(&self) -> EtrgsR {
58        EtrgsR::new(((self.bits >> 7) & 1) != 0)
59    }
60}
61#[doc = "Interrupt Mask Register (channel = 0)\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`imr0::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
62pub struct Imr0Spec;
63impl crate::RegisterSpec for Imr0Spec {
64    type Ux = u32;
65}
66#[doc = "`read()` method returns [`imr0::R`](R) reader structure"]
67impl crate::Readable for Imr0Spec {}
68#[doc = "`reset()` method sets IMR0 to value 0"]
69impl crate::Resettable for Imr0Spec {
70    const RESET_VALUE: u32 = 0;
71}