atsam3n4c/rtc/
sr.rs

1#[doc = "Register `SR` reader"]
2pub type R = crate::R<SrSpec>;
3#[doc = "Field `ACKUPD` reader - Acknowledge for Update"]
4pub type AckupdR = crate::BitReader;
5#[doc = "Field `ALARM` reader - Alarm Flag"]
6pub type AlarmR = crate::BitReader;
7#[doc = "Field `SEC` reader - Second Event"]
8pub type SecR = crate::BitReader;
9#[doc = "Field `TIMEV` reader - Time Event"]
10pub type TimevR = crate::BitReader;
11#[doc = "Field `CALEV` reader - Calendar Event"]
12pub type CalevR = crate::BitReader;
13impl R {
14    #[doc = "Bit 0 - Acknowledge for Update"]
15    #[inline(always)]
16    pub fn ackupd(&self) -> AckupdR {
17        AckupdR::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 1 - Alarm Flag"]
20    #[inline(always)]
21    pub fn alarm(&self) -> AlarmR {
22        AlarmR::new(((self.bits >> 1) & 1) != 0)
23    }
24    #[doc = "Bit 2 - Second Event"]
25    #[inline(always)]
26    pub fn sec(&self) -> SecR {
27        SecR::new(((self.bits >> 2) & 1) != 0)
28    }
29    #[doc = "Bit 3 - Time Event"]
30    #[inline(always)]
31    pub fn timev(&self) -> TimevR {
32        TimevR::new(((self.bits >> 3) & 1) != 0)
33    }
34    #[doc = "Bit 4 - Calendar Event"]
35    #[inline(always)]
36    pub fn calev(&self) -> CalevR {
37        CalevR::new(((self.bits >> 4) & 1) != 0)
38    }
39}
40#[doc = "Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sr::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct SrSpec;
42impl crate::RegisterSpec for SrSpec {
43    type Ux = u32;
44}
45#[doc = "`read()` method returns [`sr::R`](R) reader structure"]
46impl crate::Readable for SrSpec {}
47#[doc = "`reset()` method sets SR to value 0"]
48impl crate::Resettable for SrSpec {
49    const RESET_VALUE: u32 = 0;
50}