atsam3n2c/rtc/
ver.rs

1#[doc = "Register `VER` reader"]
2pub type R = crate::R<VerSpec>;
3#[doc = "Field `NVTIM` reader - Non-valid Time"]
4pub type NvtimR = crate::BitReader;
5#[doc = "Field `NVCAL` reader - Non-valid Calendar"]
6pub type NvcalR = crate::BitReader;
7#[doc = "Field `NVTIMALR` reader - Non-valid Time Alarm"]
8pub type NvtimalrR = crate::BitReader;
9#[doc = "Field `NVCALALR` reader - Non-valid Calendar Alarm"]
10pub type NvcalalrR = crate::BitReader;
11impl R {
12    #[doc = "Bit 0 - Non-valid Time"]
13    #[inline(always)]
14    pub fn nvtim(&self) -> NvtimR {
15        NvtimR::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bit 1 - Non-valid Calendar"]
18    #[inline(always)]
19    pub fn nvcal(&self) -> NvcalR {
20        NvcalR::new(((self.bits >> 1) & 1) != 0)
21    }
22    #[doc = "Bit 2 - Non-valid Time Alarm"]
23    #[inline(always)]
24    pub fn nvtimalr(&self) -> NvtimalrR {
25        NvtimalrR::new(((self.bits >> 2) & 1) != 0)
26    }
27    #[doc = "Bit 3 - Non-valid Calendar Alarm"]
28    #[inline(always)]
29    pub fn nvcalalr(&self) -> NvcalalrR {
30        NvcalalrR::new(((self.bits >> 3) & 1) != 0)
31    }
32}
33#[doc = "Valid Entry Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ver::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
34pub struct VerSpec;
35impl crate::RegisterSpec for VerSpec {
36    type Ux = u32;
37}
38#[doc = "`read()` method returns [`ver::R`](R) reader structure"]
39impl crate::Readable for VerSpec {}
40#[doc = "`reset()` method sets VER to value 0"]
41impl crate::Resettable for VerSpec {
42    const RESET_VALUE: u32 = 0;
43}