atsamd51n/osc32kctrl/
status.rs
1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<StatusSpec>;
3#[doc = "Field `XOSC32KRDY` reader - XOSC32K Ready"]
4pub type Xosc32krdyR = crate::BitReader;
5#[doc = "Field `XOSC32KFAIL` reader - XOSC32K Clock Failure Detector"]
6pub type Xosc32kfailR = crate::BitReader;
7#[doc = "Field `XOSC32KSW` reader - XOSC32K Clock switch"]
8pub type Xosc32kswR = crate::BitReader;
9impl R {
10 #[doc = "Bit 0 - XOSC32K Ready"]
11 #[inline(always)]
12 pub fn xosc32krdy(&self) -> Xosc32krdyR {
13 Xosc32krdyR::new((self.bits & 1) != 0)
14 }
15 #[doc = "Bit 2 - XOSC32K Clock Failure Detector"]
16 #[inline(always)]
17 pub fn xosc32kfail(&self) -> Xosc32kfailR {
18 Xosc32kfailR::new(((self.bits >> 2) & 1) != 0)
19 }
20 #[doc = "Bit 3 - XOSC32K Clock switch"]
21 #[inline(always)]
22 pub fn xosc32ksw(&self) -> Xosc32kswR {
23 Xosc32kswR::new(((self.bits >> 3) & 1) != 0)
24 }
25}
26#[doc = "Power and Clocks Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
27pub struct StatusSpec;
28impl crate::RegisterSpec for StatusSpec {
29 type Ux = u32;
30}
31#[doc = "`read()` method returns [`status::R`](R) reader structure"]
32impl crate::Readable for StatusSpec {}
33#[doc = "`reset()` method sets STATUS to value 0"]
34impl crate::Resettable for StatusSpec {
35 const RESET_VALUE: u32 = 0;
36}