1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#[doc = "Register `RCC_OCENSETR` reader"]
pub struct R(crate::R<RCC_OCENSETR_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<RCC_OCENSETR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<RCC_OCENSETR_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<RCC_OCENSETR_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `RCC_OCENSETR` writer"]
pub struct W(crate::W<RCC_OCENSETR_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<RCC_OCENSETR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl From<crate::W<RCC_OCENSETR_SPEC>> for W {
    #[inline(always)]
    fn from(writer: crate::W<RCC_OCENSETR_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `HSION` reader - HSION"]
pub type HSION_R = crate::BitReader<bool>;
#[doc = "Field `HSION` writer - HSION"]
pub type HSION_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `HSIKERON` reader - HSIKERON"]
pub type HSIKERON_R = crate::BitReader<bool>;
#[doc = "Field `HSIKERON` writer - HSIKERON"]
pub type HSIKERON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `CSION` reader - CSION"]
pub type CSION_R = crate::BitReader<bool>;
#[doc = "Field `CSION` writer - CSION"]
pub type CSION_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `CSIKERON` reader - CSIKERON"]
pub type CSIKERON_R = crate::BitReader<bool>;
#[doc = "Field `CSIKERON` writer - CSIKERON"]
pub type CSIKERON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `DIGBYP` reader - DIGBYP"]
pub type DIGBYP_R = crate::BitReader<bool>;
#[doc = "Field `DIGBYP` writer - DIGBYP"]
pub type DIGBYP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `HSEON` reader - HSEON"]
pub type HSEON_R = crate::BitReader<bool>;
#[doc = "Field `HSEON` writer - HSEON"]
pub type HSEON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `HSEKERON` reader - HSEKERON"]
pub type HSEKERON_R = crate::BitReader<bool>;
#[doc = "Field `HSEKERON` writer - HSEKERON"]
pub type HSEKERON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `HSEBYP` reader - HSEBYP"]
pub type HSEBYP_R = crate::BitReader<bool>;
#[doc = "Field `HSEBYP` writer - HSEBYP"]
pub type HSEBYP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
#[doc = "Field `HSECSSON` reader - HSECSSON"]
pub type HSECSSON_R = crate::BitReader<bool>;
#[doc = "Field `HSECSSON` writer - HSECSSON"]
pub type HSECSSON_W<'a, const O: u8> = crate::BitWriter<'a, u32, RCC_OCENSETR_SPEC, bool, O>;
impl R {
    #[doc = "Bit 0 - HSION"]
    #[inline(always)]
    pub fn hsion(&self) -> HSION_R {
        HSION_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - HSIKERON"]
    #[inline(always)]
    pub fn hsikeron(&self) -> HSIKERON_R {
        HSIKERON_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 4 - CSION"]
    #[inline(always)]
    pub fn csion(&self) -> CSION_R {
        CSION_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - CSIKERON"]
    #[inline(always)]
    pub fn csikeron(&self) -> CSIKERON_R {
        CSIKERON_R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 7 - DIGBYP"]
    #[inline(always)]
    pub fn digbyp(&self) -> DIGBYP_R {
        DIGBYP_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bit 8 - HSEON"]
    #[inline(always)]
    pub fn hseon(&self) -> HSEON_R {
        HSEON_R::new(((self.bits >> 8) & 1) != 0)
    }
    #[doc = "Bit 9 - HSEKERON"]
    #[inline(always)]
    pub fn hsekeron(&self) -> HSEKERON_R {
        HSEKERON_R::new(((self.bits >> 9) & 1) != 0)
    }
    #[doc = "Bit 10 - HSEBYP"]
    #[inline(always)]
    pub fn hsebyp(&self) -> HSEBYP_R {
        HSEBYP_R::new(((self.bits >> 10) & 1) != 0)
    }
    #[doc = "Bit 11 - HSECSSON"]
    #[inline(always)]
    pub fn hsecsson(&self) -> HSECSSON_R {
        HSECSSON_R::new(((self.bits >> 11) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - HSION"]
    #[inline(always)]
    pub fn hsion(&mut self) -> HSION_W<0> {
        HSION_W::new(self)
    }
    #[doc = "Bit 1 - HSIKERON"]
    #[inline(always)]
    pub fn hsikeron(&mut self) -> HSIKERON_W<1> {
        HSIKERON_W::new(self)
    }
    #[doc = "Bit 4 - CSION"]
    #[inline(always)]
    pub fn csion(&mut self) -> CSION_W<4> {
        CSION_W::new(self)
    }
    #[doc = "Bit 5 - CSIKERON"]
    #[inline(always)]
    pub fn csikeron(&mut self) -> CSIKERON_W<5> {
        CSIKERON_W::new(self)
    }
    #[doc = "Bit 7 - DIGBYP"]
    #[inline(always)]
    pub fn digbyp(&mut self) -> DIGBYP_W<7> {
        DIGBYP_W::new(self)
    }
    #[doc = "Bit 8 - HSEON"]
    #[inline(always)]
    pub fn hseon(&mut self) -> HSEON_W<8> {
        HSEON_W::new(self)
    }
    #[doc = "Bit 9 - HSEKERON"]
    #[inline(always)]
    pub fn hsekeron(&mut self) -> HSEKERON_W<9> {
        HSEKERON_W::new(self)
    }
    #[doc = "Bit 10 - HSEBYP"]
    #[inline(always)]
    pub fn hsebyp(&mut self) -> HSEBYP_W<10> {
        HSEBYP_W::new(self)
    }
    #[doc = "Bit 11 - HSECSSON"]
    #[inline(always)]
    pub fn hsecsson(&mut self) -> HSECSSON_W<11> {
        HSECSSON_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "This register is used to control the oscillators.Writing to this register has no effect, writing will set the corresponding bits. Reading will give the effective values of each bit.If TZEN = MCKPROT = , this register can only be modified in secure mode. Write access to this register is not allowed during the clock restore sequence. See Section: The clock restore sequence description for details.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rcc_ocensetr](index.html) module"]
pub struct RCC_OCENSETR_SPEC;
impl crate::RegisterSpec for RCC_OCENSETR_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [rcc_ocensetr::R](R) reader structure"]
impl crate::Readable for RCC_OCENSETR_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rcc_ocensetr::W](W) writer structure"]
impl crate::Writable for RCC_OCENSETR_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets RCC_OCENSETR to value 0x01"]
impl crate::Resettable for RCC_OCENSETR_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0x01
    }
}