1#[doc = "Register `IMR` reader"]
2pub struct R(crate::R<IMR_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<IMR_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<IMR_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<IMR_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `ACK` reader - Acknowledge Update Interrupt Mask"]
17pub type ACK_R = crate::BitReader<bool>;
18#[doc = "Field `ALR` reader - Alarm Interrupt Mask"]
19pub type ALR_R = crate::BitReader<bool>;
20#[doc = "Field `SEC` reader - Second Event Interrupt Mask"]
21pub type SEC_R = crate::BitReader<bool>;
22#[doc = "Field `TIM` reader - Time Event Interrupt Mask"]
23pub type TIM_R = crate::BitReader<bool>;
24#[doc = "Field `CAL` reader - Calendar Event Interrupt Mask"]
25pub type CAL_R = crate::BitReader<bool>;
26impl R {
27    #[doc = "Bit 0 - Acknowledge Update Interrupt Mask"]
28    #[inline(always)]
29    pub fn ack(&self) -> ACK_R {
30        ACK_R::new((self.bits & 1) != 0)
31    }
32    #[doc = "Bit 1 - Alarm Interrupt Mask"]
33    #[inline(always)]
34    pub fn alr(&self) -> ALR_R {
35        ALR_R::new(((self.bits >> 1) & 1) != 0)
36    }
37    #[doc = "Bit 2 - Second Event Interrupt Mask"]
38    #[inline(always)]
39    pub fn sec(&self) -> SEC_R {
40        SEC_R::new(((self.bits >> 2) & 1) != 0)
41    }
42    #[doc = "Bit 3 - Time Event Interrupt Mask"]
43    #[inline(always)]
44    pub fn tim(&self) -> TIM_R {
45        TIM_R::new(((self.bits >> 3) & 1) != 0)
46    }
47    #[doc = "Bit 4 - Calendar Event Interrupt Mask"]
48    #[inline(always)]
49    pub fn cal(&self) -> CAL_R {
50        CAL_R::new(((self.bits >> 4) & 1) != 0)
51    }
52}
53#[doc = "Interrupt Mask 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 [imr](index.html) module"]
54pub struct IMR_SPEC;
55impl crate::RegisterSpec for IMR_SPEC {
56    type Ux = u32;
57}
58#[doc = "`read()` method returns [imr::R](R) reader structure"]
59impl crate::Readable for IMR_SPEC {
60    type Reader = R;
61}
62#[doc = "`reset()` method sets IMR to value 0"]
63impl crate::Resettable for IMR_SPEC {
64    const RESET_VALUE: Self::Ux = 0;
65}