corstone300_pac/sysinfo/
sys_config1.rs1#[doc = "Register `SYS_CONFIG1` reader"]
6pub struct R(crate::R<SYS_CONFIG1_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<SYS_CONFIG1_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<SYS_CONFIG1_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<SYS_CONFIG1_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Field `CPU2_TYPE` reader - CPU 2 Core Type."]
21pub type CPU2_TYPE_R = crate::FieldReader<u8, CPU2_TYPE_A>;
22#[doc = "CPU 2 Core Type.\n\nValue on reset: 0"]
23#[derive(Clone, Copy, Debug, PartialEq, Eq)]
24#[repr(u8)]
25pub enum CPU2_TYPE_A {
26 #[doc = "0: Does not exist."]
27 NO = 0,
28}
29impl From<CPU2_TYPE_A> for u8 {
30 #[inline(always)]
31 fn from(variant: CPU2_TYPE_A) -> Self {
32 variant as _
33 }
34}
35impl CPU2_TYPE_R {
36 #[doc = "Get enumerated values variant"]
37 #[inline(always)]
38 pub fn variant(&self) -> Option<CPU2_TYPE_A> {
39 match self.bits {
40 0 => Some(CPU2_TYPE_A::NO),
41 _ => None,
42 }
43 }
44 #[doc = "Checks if the value of the field is `NO`"]
45 #[inline(always)]
46 pub fn is_no(&self) -> bool {
47 *self == CPU2_TYPE_A::NO
48 }
49}
50#[doc = "Field `CPU2_HAS_SYSTCM` reader - CPU 2 has System TCM. Note that this is not the CPU's local ITCM or DTCM, but instead are TCMs implemented at system level."]
51pub type CPU2_HAS_SYSTCM_R = crate::BitReader<CPU2_HAS_SYSTCM_A>;
52#[doc = "CPU 2 has System TCM. Note that this is not the CPU's local ITCM or DTCM, but instead are TCMs implemented at system level.\n\nValue on reset: 0"]
53#[derive(Clone, Copy, Debug, PartialEq, Eq)]
54pub enum CPU2_HAS_SYSTCM_A {
55 #[doc = "0: Not included."]
56 NO = 0,
57 #[doc = "1: Included."]
58 YES = 1,
59}
60impl From<CPU2_HAS_SYSTCM_A> for bool {
61 #[inline(always)]
62 fn from(variant: CPU2_HAS_SYSTCM_A) -> Self {
63 variant as u8 != 0
64 }
65}
66impl CPU2_HAS_SYSTCM_R {
67 #[doc = "Get enumerated values variant"]
68 #[inline(always)]
69 pub fn variant(&self) -> CPU2_HAS_SYSTCM_A {
70 match self.bits {
71 false => CPU2_HAS_SYSTCM_A::NO,
72 true => CPU2_HAS_SYSTCM_A::YES,
73 }
74 }
75 #[doc = "Checks if the value of the field is `NO`"]
76 #[inline(always)]
77 pub fn is_no(&self) -> bool {
78 *self == CPU2_HAS_SYSTCM_A::NO
79 }
80 #[doc = "Checks if the value of the field is `YES`"]
81 #[inline(always)]
82 pub fn is_yes(&self) -> bool {
83 *self == CPU2_HAS_SYSTCM_A::YES
84 }
85}
86#[doc = "Field `CPU2_TCM_BANK_NUM` reader - The VM Bank that is the TCM memory for CPU 2."]
87pub type CPU2_TCM_BANK_NUM_R = crate::FieldReader<u8, u8>;
88#[doc = "Field `CPU3_TYPE` reader - CPU 3 Core Type."]
89pub type CPU3_TYPE_R = crate::FieldReader<u8, CPU3_TYPE_A>;
90#[doc = "CPU 3 Core Type.\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92#[repr(u8)]
93pub enum CPU3_TYPE_A {
94 #[doc = "0: Does not exist."]
95 NO = 0,
96}
97impl From<CPU3_TYPE_A> for u8 {
98 #[inline(always)]
99 fn from(variant: CPU3_TYPE_A) -> Self {
100 variant as _
101 }
102}
103impl CPU3_TYPE_R {
104 #[doc = "Get enumerated values variant"]
105 #[inline(always)]
106 pub fn variant(&self) -> Option<CPU3_TYPE_A> {
107 match self.bits {
108 0 => Some(CPU3_TYPE_A::NO),
109 _ => None,
110 }
111 }
112 #[doc = "Checks if the value of the field is `NO`"]
113 #[inline(always)]
114 pub fn is_no(&self) -> bool {
115 *self == CPU3_TYPE_A::NO
116 }
117}
118#[doc = "Field `CPU3_HAS_SYSTCM` reader - CPU 3 has System TCM. Note that this is not the CPU's local ITCM or DTCM, but instead are TCMs implemented at system level."]
119pub type CPU3_HAS_SYSTCM_R = crate::BitReader<CPU3_HAS_SYSTCM_A>;
120#[doc = "CPU 3 has System TCM. Note that this is not the CPU's local ITCM or DTCM, but instead are TCMs implemented at system level.\n\nValue on reset: 0"]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum CPU3_HAS_SYSTCM_A {
123 #[doc = "0: Not included."]
124 NO = 0,
125 #[doc = "1: Included."]
126 YES = 1,
127}
128impl From<CPU3_HAS_SYSTCM_A> for bool {
129 #[inline(always)]
130 fn from(variant: CPU3_HAS_SYSTCM_A) -> Self {
131 variant as u8 != 0
132 }
133}
134impl CPU3_HAS_SYSTCM_R {
135 #[doc = "Get enumerated values variant"]
136 #[inline(always)]
137 pub fn variant(&self) -> CPU3_HAS_SYSTCM_A {
138 match self.bits {
139 false => CPU3_HAS_SYSTCM_A::NO,
140 true => CPU3_HAS_SYSTCM_A::YES,
141 }
142 }
143 #[doc = "Checks if the value of the field is `NO`"]
144 #[inline(always)]
145 pub fn is_no(&self) -> bool {
146 *self == CPU3_HAS_SYSTCM_A::NO
147 }
148 #[doc = "Checks if the value of the field is `YES`"]
149 #[inline(always)]
150 pub fn is_yes(&self) -> bool {
151 *self == CPU3_HAS_SYSTCM_A::YES
152 }
153}
154#[doc = "Field `CPU3_TCM_BANK_NUM` reader - The VM Bank that is the TCM memory for CPU 3."]
155pub type CPU3_TCM_BANK_NUM_R = crate::FieldReader<u8, u8>;
156impl R {
157 #[doc = "Bits 0:2 - CPU 2 Core Type."]
158 #[inline(always)]
159 pub fn cpu2_type(&self) -> CPU2_TYPE_R {
160 CPU2_TYPE_R::new((self.bits & 7) as u8)
161 }
162 #[doc = "Bit 3 - CPU 2 has System TCM. Note that this is not the CPU's local ITCM or DTCM, but instead are TCMs implemented at system level."]
163 #[inline(always)]
164 pub fn cpu2_has_systcm(&self) -> CPU2_HAS_SYSTCM_R {
165 CPU2_HAS_SYSTCM_R::new(((self.bits >> 3) & 1) != 0)
166 }
167 #[doc = "Bits 4:7 - The VM Bank that is the TCM memory for CPU 2."]
168 #[inline(always)]
169 pub fn cpu2_tcm_bank_num(&self) -> CPU2_TCM_BANK_NUM_R {
170 CPU2_TCM_BANK_NUM_R::new(((self.bits >> 4) & 0x0f) as u8)
171 }
172 #[doc = "Bits 8:10 - CPU 3 Core Type."]
173 #[inline(always)]
174 pub fn cpu3_type(&self) -> CPU3_TYPE_R {
175 CPU3_TYPE_R::new(((self.bits >> 8) & 7) as u8)
176 }
177 #[doc = "Bit 11 - CPU 3 has System TCM. Note that this is not the CPU's local ITCM or DTCM, but instead are TCMs implemented at system level."]
178 #[inline(always)]
179 pub fn cpu3_has_systcm(&self) -> CPU3_HAS_SYSTCM_R {
180 CPU3_HAS_SYSTCM_R::new(((self.bits >> 11) & 1) != 0)
181 }
182 #[doc = "Bits 12:15 - The VM Bank that is the TCM memory for CPU 3."]
183 #[inline(always)]
184 pub fn cpu3_tcm_bank_num(&self) -> CPU3_TCM_BANK_NUM_R {
185 CPU3_TCM_BANK_NUM_R::new(((self.bits >> 12) & 0x0f) as u8)
186 }
187}
188#[doc = "System Hardware Configuration 0 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 [sys_config1](index.html) module"]
189pub struct SYS_CONFIG1_SPEC;
190impl crate::RegisterSpec for SYS_CONFIG1_SPEC {
191 type Ux = u32;
192}
193#[doc = "`read()` method returns [sys_config1::R](R) reader structure"]
194impl crate::Readable for SYS_CONFIG1_SPEC {
195 type Reader = R;
196}
197#[doc = "`reset()` method sets SYS_CONFIG1 to value 0"]
198impl crate::Resettable for SYS_CONFIG1_SPEC {
199 #[inline(always)]
200 fn reset_value() -> Self::Ux {
201 0
202 }
203}