1#[doc = "Register `OSC_STA_0` reader"]
2pub struct R(crate::R<OSC_STA_0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<OSC_STA_0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<OSC_STA_0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<OSC_STA_0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `lock` reader - Please refer to the Technical Reference Manual for detail, NO SYNC, FW need to read it twice to ensure the value."]
17pub struct LOCK_R(crate::FieldReader<bool, bool>);
18impl LOCK_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: bool) -> Self {
21 LOCK_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for LOCK_R {
25 type Target = crate::FieldReader<bool, bool>;
26 #[inline(always)]
27 fn deref(&self) -> &Self::Target {
28 &self.0
29 }
30}
31#[doc = "Field `anatestreq_` reader - Please refer to the Technical Reference Manual for detail, NO SYNC, FW need to read it twice to ensure the value."]
32pub struct ANATESTREQ__R(crate::FieldReader<bool, bool>);
33impl ANATESTREQ__R {
34 #[inline(always)]
35 pub(crate) fn new(bits: bool) -> Self {
36 ANATESTREQ__R(crate::FieldReader::new(bits))
37 }
38}
39impl core::ops::Deref for ANATESTREQ__R {
40 type Target = crate::FieldReader<bool, bool>;
41 #[inline(always)]
42 fn deref(&self) -> &Self::Target {
43 &self.0
44 }
45}
46impl R {
47 #[doc = "Bit 0 - Please refer to the Technical Reference Manual for detail, NO SYNC, FW need to read it twice to ensure the value."]
48 #[inline(always)]
49 pub fn lock(&self) -> LOCK_R {
50 LOCK_R::new((self.bits & 0x01) != 0)
51 }
52 #[doc = "Bit 1 - Please refer to the Technical Reference Manual for detail, NO SYNC, FW need to read it twice to ensure the value."]
53 #[inline(always)]
54 pub fn anatestreq_(&self) -> ANATESTREQ__R {
55 ANATESTREQ__R::new(((self.bits >> 1) & 0x01) != 0)
56 }
57}
58#[doc = "Contains information about oscilator status\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 [osc_sta_0](index.html) module"]
59pub struct OSC_STA_0_SPEC;
60impl crate::RegisterSpec for OSC_STA_0_SPEC {
61 type Ux = u32;
62}
63#[doc = "`read()` method returns [osc_sta_0::R](R) reader structure"]
64impl crate::Readable for OSC_STA_0_SPEC {
65 type Reader = R;
66}
67#[doc = "`reset()` method sets OSC_STA_0 to value 0"]
68impl crate::Resettable for OSC_STA_0_SPEC {
69 #[inline(always)]
70 fn reset_value() -> Self::Ux {
71 0
72 }
73}