1#[doc = "Register `OSCSF` reader"]
2pub struct R(crate::R<OSCSF_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<OSCSF_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<OSCSF_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<OSCSF_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `HOCOSF` reader - HOCO Clock Oscillation Stabilization Flag"]
17pub type HOCOSF_R = crate::BitReader<HOCOSF_A>;
18#[doc = "HOCO Clock Oscillation Stabilization Flag\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20pub enum HOCOSF_A {
21 #[doc = "0: The HOCO clock is stopped or is not yet stable"]
22 _0 = 0,
23 #[doc = "1: The HOCO clock is stable, so is available for use as the system clock"]
24 _1 = 1,
25}
26impl From<HOCOSF_A> for bool {
27 #[inline(always)]
28 fn from(variant: HOCOSF_A) -> Self {
29 variant as u8 != 0
30 }
31}
32impl HOCOSF_R {
33 #[doc = "Get enumerated values variant"]
34 #[inline(always)]
35 pub fn variant(&self) -> HOCOSF_A {
36 match self.bits {
37 false => HOCOSF_A::_0,
38 true => HOCOSF_A::_1,
39 }
40 }
41 #[doc = "Checks if the value of the field is `_0`"]
42 #[inline(always)]
43 pub fn is_0(&self) -> bool {
44 *self == HOCOSF_A::_0
45 }
46 #[doc = "Checks if the value of the field is `_1`"]
47 #[inline(always)]
48 pub fn is_1(&self) -> bool {
49 *self == HOCOSF_A::_1
50 }
51}
52#[doc = "Field `MOSCSF` reader - Main Clock Oscillation Stabilization Flag"]
53pub type MOSCSF_R = crate::BitReader<MOSCSF_A>;
54#[doc = "Main Clock Oscillation Stabilization Flag\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq, Eq)]
56pub enum MOSCSF_A {
57 #[doc = "0: The main clock oscillator is stopped (MOSTP = 1) or is not yet stable"]
58 _0 = 0,
59 #[doc = "1: The main clock oscillator is stable, so is available for use as the system clock"]
60 _1 = 1,
61}
62impl From<MOSCSF_A> for bool {
63 #[inline(always)]
64 fn from(variant: MOSCSF_A) -> Self {
65 variant as u8 != 0
66 }
67}
68impl MOSCSF_R {
69 #[doc = "Get enumerated values variant"]
70 #[inline(always)]
71 pub fn variant(&self) -> MOSCSF_A {
72 match self.bits {
73 false => MOSCSF_A::_0,
74 true => MOSCSF_A::_1,
75 }
76 }
77 #[doc = "Checks if the value of the field is `_0`"]
78 #[inline(always)]
79 pub fn is_0(&self) -> bool {
80 *self == MOSCSF_A::_0
81 }
82 #[doc = "Checks if the value of the field is `_1`"]
83 #[inline(always)]
84 pub fn is_1(&self) -> bool {
85 *self == MOSCSF_A::_1
86 }
87}
88#[doc = "Field `PLLSF` reader - PLL Clock Oscillation Stabilization Flag"]
89pub type PLLSF_R = crate::BitReader<PLLSF_A>;
90#[doc = "PLL Clock Oscillation Stabilization Flag\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum PLLSF_A {
93 #[doc = "0: The PLL clock is stopped, or oscillation of the PLL clock is not stable yet"]
94 _0 = 0,
95 #[doc = "1: The PLL clock is stable, so is available for use as the system clock"]
96 _1 = 1,
97}
98impl From<PLLSF_A> for bool {
99 #[inline(always)]
100 fn from(variant: PLLSF_A) -> Self {
101 variant as u8 != 0
102 }
103}
104impl PLLSF_R {
105 #[doc = "Get enumerated values variant"]
106 #[inline(always)]
107 pub fn variant(&self) -> PLLSF_A {
108 match self.bits {
109 false => PLLSF_A::_0,
110 true => PLLSF_A::_1,
111 }
112 }
113 #[doc = "Checks if the value of the field is `_0`"]
114 #[inline(always)]
115 pub fn is_0(&self) -> bool {
116 *self == PLLSF_A::_0
117 }
118 #[doc = "Checks if the value of the field is `_1`"]
119 #[inline(always)]
120 pub fn is_1(&self) -> bool {
121 *self == PLLSF_A::_1
122 }
123}
124#[doc = "Field `PLL2SF` reader - PLL2 Clock Oscillation Stabilization Flag"]
125pub type PLL2SF_R = crate::BitReader<PLL2SF_A>;
126#[doc = "PLL2 Clock Oscillation Stabilization Flag\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq, Eq)]
128pub enum PLL2SF_A {
129 #[doc = "0: The PLL2 clock is stopped, or oscillation of the PLL2 clock is not stable yet"]
130 _0 = 0,
131 #[doc = "1: The PLL2 clock is stable"]
132 _1 = 1,
133}
134impl From<PLL2SF_A> for bool {
135 #[inline(always)]
136 fn from(variant: PLL2SF_A) -> Self {
137 variant as u8 != 0
138 }
139}
140impl PLL2SF_R {
141 #[doc = "Get enumerated values variant"]
142 #[inline(always)]
143 pub fn variant(&self) -> PLL2SF_A {
144 match self.bits {
145 false => PLL2SF_A::_0,
146 true => PLL2SF_A::_1,
147 }
148 }
149 #[doc = "Checks if the value of the field is `_0`"]
150 #[inline(always)]
151 pub fn is_0(&self) -> bool {
152 *self == PLL2SF_A::_0
153 }
154 #[doc = "Checks if the value of the field is `_1`"]
155 #[inline(always)]
156 pub fn is_1(&self) -> bool {
157 *self == PLL2SF_A::_1
158 }
159}
160impl R {
161 #[doc = "Bit 0 - HOCO Clock Oscillation Stabilization Flag"]
162 #[inline(always)]
163 pub fn hocosf(&self) -> HOCOSF_R {
164 HOCOSF_R::new((self.bits & 1) != 0)
165 }
166 #[doc = "Bit 3 - Main Clock Oscillation Stabilization Flag"]
167 #[inline(always)]
168 pub fn moscsf(&self) -> MOSCSF_R {
169 MOSCSF_R::new(((self.bits >> 3) & 1) != 0)
170 }
171 #[doc = "Bit 5 - PLL Clock Oscillation Stabilization Flag"]
172 #[inline(always)]
173 pub fn pllsf(&self) -> PLLSF_R {
174 PLLSF_R::new(((self.bits >> 5) & 1) != 0)
175 }
176 #[doc = "Bit 6 - PLL2 Clock Oscillation Stabilization Flag"]
177 #[inline(always)]
178 pub fn pll2sf(&self) -> PLL2SF_R {
179 PLL2SF_R::new(((self.bits >> 6) & 1) != 0)
180 }
181}
182#[doc = "Oscillation Stabilization Flag 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 [oscsf](index.html) module"]
183pub struct OSCSF_SPEC;
184impl crate::RegisterSpec for OSCSF_SPEC {
185 type Ux = u8;
186}
187#[doc = "`read()` method returns [oscsf::R](R) reader structure"]
188impl crate::Readable for OSCSF_SPEC {
189 type Reader = R;
190}
191#[doc = "`reset()` method sets OSCSF to value 0"]
192impl crate::Resettable for OSCSF_SPEC {
193 const RESET_VALUE: Self::Ux = 0;
194}