corstone300_pac/syscontrol/
clock_force.rs1#[doc = "Register `CLOCK_FORCE` reader"]
6pub struct R(crate::R<CLOCK_FORCE_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<CLOCK_FORCE_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<CLOCK_FORCE_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<CLOCK_FORCE_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `CLOCK_FORCE` writer"]
21pub struct W(crate::W<CLOCK_FORCE_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<CLOCK_FORCE_SPEC>;
24 #[inline(always)]
25 fn deref(&self) -> &Self::Target {
26 &self.0
27 }
28}
29impl core::ops::DerefMut for W {
30 #[inline(always)]
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34}
35impl From<crate::W<CLOCK_FORCE_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<CLOCK_FORCE_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `MGMT_CLKFORCE` reader - Set HIGH to force all clocks in PD_AON domain that runs on SYSCLK to run."]
42pub type MGMT_CLKFORCE_R = crate::BitReader<bool>;
43#[doc = "Field `MGMT_CLKFORCE` writer - Set HIGH to force all clocks in PD_AON domain that runs on SYSCLK to run."]
44pub type MGMT_CLKFORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
45#[doc = "Field `SYS_CLKFORCE` reader - Set HIGH to force all clocks in PD_SYS to run."]
46pub type SYS_CLKFORCE_R = crate::BitReader<bool>;
47#[doc = "Field `SYS_CLKFORCE` writer - Set HIGH to force all clocks in PD_SYS to run."]
48pub type SYS_CLKFORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
49#[doc = "Field `DEBUG_CLKFORCE` reader - Set HIGH to force all clocks in PD_DEBUG to run."]
50pub type DEBUG_CLKFORCE_R = crate::BitReader<bool>;
51#[doc = "Field `DEBUG_CLKFORCE` writer - Set HIGH to force all clocks in PD_DEBUG to run."]
52pub type DEBUG_CLKFORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
53#[doc = "Field `CPU0_CLKFORCE` reader - Set HIGH to force PD_CPU0 Local clocks to run."]
54pub type CPU0_CLKFORCE_R = crate::BitReader<bool>;
55#[doc = "Field `CPU0_CLKFORCE` writer - Set HIGH to force PD_CPU0 Local clocks to run."]
56pub type CPU0_CLKFORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
57#[doc = "Field `AONCLK_FORCE` reader - Set HIGH to request the input AONCLK source to stay ON."]
58pub type AONCLK_FORCE_R = crate::BitReader<bool>;
59#[doc = "Field `AONCLK_FORCE` writer - Set HIGH to request the input AONCLK source to stay ON."]
60pub type AONCLK_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
61#[doc = "Field `SYSCLK_FORCE` reader - Set HIGH to request the input SYSCLK source to stay ON."]
62pub type SYSCLK_FORCE_R = crate::BitReader<bool>;
63#[doc = "Field `SYSCLK_FORCE` writer - Set HIGH to request the input SYSCLK source to stay ON."]
64pub type SYSCLK_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
65#[doc = "Field `CPU0CLK_FORCE` reader - Set HIGH to request the input CPU0CLK source to stay ON.."]
66pub type CPU0CLK_FORCE_R = crate::BitReader<bool>;
67#[doc = "Field `CPU0CLK_FORCE` writer - Set HIGH to request the input CPU0CLK source to stay ON.."]
68pub type CPU0CLK_FORCE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CLOCK_FORCE_SPEC, bool, O>;
69impl R {
70 #[doc = "Bit 0 - Set HIGH to force all clocks in PD_AON domain that runs on SYSCLK to run."]
71 #[inline(always)]
72 pub fn mgmt_clkforce(&self) -> MGMT_CLKFORCE_R {
73 MGMT_CLKFORCE_R::new((self.bits & 1) != 0)
74 }
75 #[doc = "Bit 1 - Set HIGH to force all clocks in PD_SYS to run."]
76 #[inline(always)]
77 pub fn sys_clkforce(&self) -> SYS_CLKFORCE_R {
78 SYS_CLKFORCE_R::new(((self.bits >> 1) & 1) != 0)
79 }
80 #[doc = "Bit 2 - Set HIGH to force all clocks in PD_DEBUG to run."]
81 #[inline(always)]
82 pub fn debug_clkforce(&self) -> DEBUG_CLKFORCE_R {
83 DEBUG_CLKFORCE_R::new(((self.bits >> 2) & 1) != 0)
84 }
85 #[doc = "Bit 4 - Set HIGH to force PD_CPU0 Local clocks to run."]
86 #[inline(always)]
87 pub fn cpu0_clkforce(&self) -> CPU0_CLKFORCE_R {
88 CPU0_CLKFORCE_R::new(((self.bits >> 4) & 1) != 0)
89 }
90 #[doc = "Bit 16 - Set HIGH to request the input AONCLK source to stay ON."]
91 #[inline(always)]
92 pub fn aonclk_force(&self) -> AONCLK_FORCE_R {
93 AONCLK_FORCE_R::new(((self.bits >> 16) & 1) != 0)
94 }
95 #[doc = "Bit 17 - Set HIGH to request the input SYSCLK source to stay ON."]
96 #[inline(always)]
97 pub fn sysclk_force(&self) -> SYSCLK_FORCE_R {
98 SYSCLK_FORCE_R::new(((self.bits >> 17) & 1) != 0)
99 }
100 #[doc = "Bit 19 - Set HIGH to request the input CPU0CLK source to stay ON.."]
101 #[inline(always)]
102 pub fn cpu0clk_force(&self) -> CPU0CLK_FORCE_R {
103 CPU0CLK_FORCE_R::new(((self.bits >> 19) & 1) != 0)
104 }
105}
106impl W {
107 #[doc = "Bit 0 - Set HIGH to force all clocks in PD_AON domain that runs on SYSCLK to run."]
108 #[inline(always)]
109 pub fn mgmt_clkforce(&mut self) -> MGMT_CLKFORCE_W<0> {
110 MGMT_CLKFORCE_W::new(self)
111 }
112 #[doc = "Bit 1 - Set HIGH to force all clocks in PD_SYS to run."]
113 #[inline(always)]
114 pub fn sys_clkforce(&mut self) -> SYS_CLKFORCE_W<1> {
115 SYS_CLKFORCE_W::new(self)
116 }
117 #[doc = "Bit 2 - Set HIGH to force all clocks in PD_DEBUG to run."]
118 #[inline(always)]
119 pub fn debug_clkforce(&mut self) -> DEBUG_CLKFORCE_W<2> {
120 DEBUG_CLKFORCE_W::new(self)
121 }
122 #[doc = "Bit 4 - Set HIGH to force PD_CPU0 Local clocks to run."]
123 #[inline(always)]
124 pub fn cpu0_clkforce(&mut self) -> CPU0_CLKFORCE_W<4> {
125 CPU0_CLKFORCE_W::new(self)
126 }
127 #[doc = "Bit 16 - Set HIGH to request the input AONCLK source to stay ON."]
128 #[inline(always)]
129 pub fn aonclk_force(&mut self) -> AONCLK_FORCE_W<16> {
130 AONCLK_FORCE_W::new(self)
131 }
132 #[doc = "Bit 17 - Set HIGH to request the input SYSCLK source to stay ON."]
133 #[inline(always)]
134 pub fn sysclk_force(&mut self) -> SYSCLK_FORCE_W<17> {
135 SYSCLK_FORCE_W::new(self)
136 }
137 #[doc = "Bit 19 - Set HIGH to request the input CPU0CLK source to stay ON.."]
138 #[inline(always)]
139 pub fn cpu0clk_force(&mut self) -> CPU0CLK_FORCE_W<19> {
140 CPU0CLK_FORCE_W::new(self)
141 }
142 #[doc = "Writes raw bits to the register."]
143 #[inline(always)]
144 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
145 self.0.bits(bits);
146 self
147 }
148}
149#[doc = "Clock Force\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 [clock_force](index.html) module"]
150pub struct CLOCK_FORCE_SPEC;
151impl crate::RegisterSpec for CLOCK_FORCE_SPEC {
152 type Ux = u32;
153}
154#[doc = "`read()` method returns [clock_force::R](R) reader structure"]
155impl crate::Readable for CLOCK_FORCE_SPEC {
156 type Reader = R;
157}
158#[doc = "`write(|w| ..)` method takes [clock_force::W](W) writer structure"]
159impl crate::Writable for CLOCK_FORCE_SPEC {
160 type Writer = W;
161}
162#[doc = "`reset()` method sets CLOCK_FORCE to value 0"]
163impl crate::Resettable for CLOCK_FORCE_SPEC {
164 #[inline(always)]
165 fn reset_value() -> Self::Ux {
166 0
167 }
168}