atsamd51g/icm/
imr.rs

1#[doc = "Register `IMR` reader"]
2pub type R = crate::R<ImrSpec>;
3#[doc = "Field `RHC` reader - Region Hash Completed Interrupt Mask"]
4pub type RhcR = crate::FieldReader;
5#[doc = "Field `RDM` reader - Region Digest Mismatch Interrupt Mask"]
6pub type RdmR = crate::FieldReader;
7#[doc = "Field `RBE` reader - Region Bus Error Interrupt Mask"]
8pub type RbeR = crate::FieldReader;
9#[doc = "Field `RWC` reader - Region Wrap Condition Detected Interrupt Mask"]
10pub type RwcR = crate::FieldReader;
11#[doc = "Field `REC` reader - Region End bit Condition Detected Interrupt Mask"]
12pub type RecR = crate::FieldReader;
13#[doc = "Field `RSU` reader - Region Status Updated Interrupt Mask"]
14pub type RsuR = crate::FieldReader;
15#[doc = "Field `URAD` reader - Undefined Register Access Detection Interrupt Mask"]
16pub type UradR = crate::BitReader;
17impl R {
18    #[doc = "Bits 0:3 - Region Hash Completed Interrupt Mask"]
19    #[inline(always)]
20    pub fn rhc(&self) -> RhcR {
21        RhcR::new((self.bits & 0x0f) as u8)
22    }
23    #[doc = "Bits 4:7 - Region Digest Mismatch Interrupt Mask"]
24    #[inline(always)]
25    pub fn rdm(&self) -> RdmR {
26        RdmR::new(((self.bits >> 4) & 0x0f) as u8)
27    }
28    #[doc = "Bits 8:11 - Region Bus Error Interrupt Mask"]
29    #[inline(always)]
30    pub fn rbe(&self) -> RbeR {
31        RbeR::new(((self.bits >> 8) & 0x0f) as u8)
32    }
33    #[doc = "Bits 12:15 - Region Wrap Condition Detected Interrupt Mask"]
34    #[inline(always)]
35    pub fn rwc(&self) -> RwcR {
36        RwcR::new(((self.bits >> 12) & 0x0f) as u8)
37    }
38    #[doc = "Bits 16:19 - Region End bit Condition Detected Interrupt Mask"]
39    #[inline(always)]
40    pub fn rec(&self) -> RecR {
41        RecR::new(((self.bits >> 16) & 0x0f) as u8)
42    }
43    #[doc = "Bits 20:23 - Region Status Updated Interrupt Mask"]
44    #[inline(always)]
45    pub fn rsu(&self) -> RsuR {
46        RsuR::new(((self.bits >> 20) & 0x0f) as u8)
47    }
48    #[doc = "Bit 24 - Undefined Register Access Detection Interrupt Mask"]
49    #[inline(always)]
50    pub fn urad(&self) -> UradR {
51        UradR::new(((self.bits >> 24) & 1) != 0)
52    }
53}
54#[doc = "Interrupt Mask\n\nYou can [`read`](crate::Reg::read) this register and get [`imr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct ImrSpec;
56impl crate::RegisterSpec for ImrSpec {
57    type Ux = u32;
58}
59#[doc = "`read()` method returns [`imr::R`](R) reader structure"]
60impl crate::Readable for ImrSpec {}
61#[doc = "`reset()` method sets IMR to value 0"]
62impl crate::Resettable for ImrSpec {
63    const RESET_VALUE: u32 = 0;
64}