atsamd51p/pcc/
imr.rs

1#[doc = "Register `IMR` reader"]
2pub type R = crate::R<ImrSpec>;
3#[doc = "Field `DRDY` reader - Data Ready Interrupt Mask"]
4pub type DrdyR = crate::BitReader;
5#[doc = "Field `OVRE` reader - Overrun Error Interrupt Mask"]
6pub type OvreR = crate::BitReader;
7impl R {
8    #[doc = "Bit 0 - Data Ready Interrupt Mask"]
9    #[inline(always)]
10    pub fn drdy(&self) -> DrdyR {
11        DrdyR::new((self.bits & 1) != 0)
12    }
13    #[doc = "Bit 1 - Overrun Error Interrupt Mask"]
14    #[inline(always)]
15    pub fn ovre(&self) -> OvreR {
16        OvreR::new(((self.bits >> 1) & 1) != 0)
17    }
18}
19#[doc = "Interrupt Mask Register\n\nYou can [`read`](crate::Reg::read) this register and get [`imr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
20pub struct ImrSpec;
21impl crate::RegisterSpec for ImrSpec {
22    type Ux = u32;
23}
24#[doc = "`read()` method returns [`imr::R`](R) reader structure"]
25impl crate::Readable for ImrSpec {}
26#[doc = "`reset()` method sets IMR to value 0"]
27impl crate::Resettable for ImrSpec {
28    const RESET_VALUE: u32 = 0;
29}