@@ -55,281 +55,281 @@ impl Mcounteren {
55
55
56
56
/// User "time[h]" Enable
57
57
#[ inline]
58
- pub fn tm ( & self ) -> state {
58
+ pub fn tm ( & self ) -> State {
59
59
match self . bits . get_bit ( 1 ) {
60
- true => state :: Enabled ,
61
- false => state :: Disabled ,
60
+ true => State :: Enabled ,
61
+ false => State :: Disabled ,
62
62
}
63
63
}
64
64
65
65
/// User "instret[h]" Enable
66
66
#[ inline]
67
- pub fn ir ( & self ) -> state {
67
+ pub fn ir ( & self ) -> State {
68
68
match self . bits . get_bit ( 2 ) {
69
- true => state :: Enabled ,
70
- false => state :: Disabled ,
69
+ true => State :: Enabled ,
70
+ false => State :: Disabled ,
71
71
}
72
72
}
73
73
74
74
75
75
/// User "hpm3" Enable
76
76
#[ inline]
77
- pub fn hpm3 ( & self ) -> state {
77
+ pub fn hpm3 ( & self ) -> State {
78
78
match self . bits . get_bit ( 3 ) {
79
- true => state :: Enabled ,
80
- false => state :: Disabled ,
79
+ true => State :: Enabled ,
80
+ false => State :: Disabled ,
81
81
}
82
82
}
83
83
84
84
/// User "hpm4" Enable
85
85
#[ inline]
86
- pub fn hpm4 ( & self ) -> bool {
86
+ pub fn hpm4 ( & self ) -> State {
87
87
match self . bits . get_bit ( 4 ) {
88
- true => state :: Enabled ,
89
- false => state :: Disabled ,
88
+ true => State :: Enabled ,
89
+ false => State :: Disabled ,
90
90
}
91
91
}
92
92
93
93
/// User "hpm5" Enable
94
94
#[ inline]
95
- pub fn hpm5 ( & self ) -> bool {
95
+ pub fn hpm5 ( & self ) -> State {
96
96
match self . bits . get_bit ( 5 ) {
97
- true => state :: Enabled ,
98
- false => state :: Disabled ,
97
+ true => State :: Enabled ,
98
+ false => State :: Disabled ,
99
99
}
100
100
}
101
101
102
102
/// User "hpm6" Enable
103
103
#[ inline]
104
- pub fn hpm6 ( & self ) -> bool {
104
+ pub fn hpm6 ( & self ) -> State {
105
105
match self . bits . get_bit ( 6 ) {
106
- true => state :: Enabled ,
107
- false => state :: Disabled ,
106
+ true => State :: Enabled ,
107
+ false => State :: Disabled ,
108
108
}
109
109
}
110
110
111
111
/// User "hpm7" Enable
112
112
#[ inline]
113
- pub fn hpm7 ( & self ) -> bool {
113
+ pub fn hpm7 ( & self ) -> State {
114
114
match self . bits . get_bit ( 7 ) {
115
- true => state :: Enabled ,
116
- false => state :: Disabled ,
115
+ true => State :: Enabled ,
116
+ false => State :: Disabled ,
117
117
}
118
118
}
119
119
120
120
/// User "hpm8" Enable
121
121
#[ inline]
122
- pub fn hpm8 ( & self ) -> bool {
122
+ pub fn hpm8 ( & self ) -> State {
123
123
match self . bits . get_bit ( 8 ) {
124
- true => state :: Enabled ,
125
- false => state :: Disabled ,
124
+ true => State :: Enabled ,
125
+ false => State :: Disabled ,
126
126
}
127
127
}
128
128
129
129
/// User "hpm9" Enable
130
130
#[ inline]
131
- pub fn hpm9 ( & self ) -> bool {
131
+ pub fn hpm9 ( & self ) -> State {
132
132
match self . bits . get_bit ( 9 ) {
133
- true => state :: Enabled ,
134
- false => state :: Disabled ,
133
+ true => State :: Enabled ,
134
+ false => State :: Disabled ,
135
135
}
136
136
}
137
137
138
138
/// User "hpm10" Enable
139
139
#[ inline]
140
- pub fn hpm10 ( & self ) -> bool {
140
+ pub fn hpm10 ( & self ) -> State {
141
141
match self . bits . get_bit ( 10 ) {
142
- true => state :: Enabled ,
143
- false => state :: Disabled ,
142
+ true => State :: Enabled ,
143
+ false => State :: Disabled ,
144
144
}
145
145
}
146
146
147
147
/// User "hpm11" Enable
148
148
#[ inline]
149
- pub fn hpm11 ( & self ) -> bool {
149
+ pub fn hpm11 ( & self ) -> State {
150
150
match self . bits . get_bit ( 11 ) {
151
- true => state :: Enabled ,
152
- false => state :: Disabled ,
151
+ true => State :: Enabled ,
152
+ false => State :: Disabled ,
153
153
}
154
154
}
155
155
156
156
/// User "hpm12" Enable
157
157
#[ inline]
158
- pub fn hpm12 ( & self ) -> bool {
158
+ pub fn hpm12 ( & self ) -> State {
159
159
match self . bits . get_bit ( 12 ) {
160
- true => state :: Enabled ,
161
- false => state :: Disabled ,
160
+ true => State :: Enabled ,
161
+ false => State :: Disabled ,
162
162
}
163
163
}
164
164
165
165
/// User "hpm13" Enable
166
166
#[ inline]
167
- pub fn hpm13 ( & self ) -> bool {
167
+ pub fn hpm13 ( & self ) -> State {
168
168
match self . bits . get_bit ( 13 ) {
169
- true => state :: Enabled ,
170
- false => state :: Disabled ,
169
+ true => State :: Enabled ,
170
+ false => State :: Disabled ,
171
171
}
172
172
}
173
173
174
174
/// User "hpm14" Enable
175
175
#[ inline]
176
- pub fn hpm14 ( & self ) -> bool {
176
+ pub fn hpm14 ( & self ) -> State {
177
177
match self . bits . get_bit ( 14 ) {
178
- true => state :: Enabled ,
179
- false => state :: Disabled ,
178
+ true => State :: Enabled ,
179
+ false => State :: Disabled ,
180
180
}
181
181
}
182
182
183
183
/// User "hpm15" Enable
184
184
#[ inline]
185
- pub fn hpm15 ( & self ) -> bool {
185
+ pub fn hpm15 ( & self ) -> State {
186
186
match self . bits . get_bit ( 15 ) {
187
- true => state :: Enabled ,
188
- false => state :: Disabled ,
187
+ true => State :: Enabled ,
188
+ false => State :: Disabled ,
189
189
}
190
190
}
191
191
192
192
/// User "hpm16" Enable
193
193
#[ inline]
194
- pub fn hpm16 ( & self ) -> bool {
194
+ pub fn hpm16 ( & self ) -> State {
195
195
match self . bits . get_bit ( 16 ) {
196
- true => state :: Enabled ,
197
- false => state :: Disabled ,
196
+ true => State :: Enabled ,
197
+ false => State :: Disabled ,
198
198
}
199
199
}
200
200
201
201
/// User "hpm17" Enable
202
202
#[ inline]
203
- pub fn hpm17 ( & self ) -> bool {
203
+ pub fn hpm17 ( & self ) -> State {
204
204
match self . bits . get_bit ( 17 ) {
205
- true => state :: Enabled ,
206
- false => state :: Disabled ,
205
+ true => State :: Enabled ,
206
+ false => State :: Disabled ,
207
207
}
208
208
}
209
209
210
210
/// User "hpm18" Enable
211
211
#[ inline]
212
- pub fn hpm18 ( & self ) -> bool {
212
+ pub fn hpm18 ( & self ) -> State {
213
213
match self . bits . get_bit ( 18 ) {
214
- true => state :: Enabled ,
215
- false => state :: Disabled ,
214
+ true => State :: Enabled ,
215
+ false => State :: Disabled ,
216
216
}
217
217
}
218
218
219
219
/// User "hpm19" Enable
220
220
#[ inline]
221
- pub fn hpm19 ( & self ) -> bool {
221
+ pub fn hpm19 ( & self ) -> State {
222
222
match self . bits . get_bit ( 19 ) {
223
- true => state :: Enabled ,
224
- false => state :: Disabled ,
223
+ true => State :: Enabled ,
224
+ false => State :: Disabled ,
225
225
}
226
226
}
227
227
228
228
/// User "hpm20" Enable
229
229
#[ inline]
230
- pub fn hpm20 ( & self ) -> bool {
230
+ pub fn hpm20 ( & self ) -> State {
231
231
match self . bits . get_bit ( 20 ) {
232
- true => state :: Enabled ,
233
- false => state :: Disabled ,
232
+ true => State :: Enabled ,
233
+ false => State :: Disabled ,
234
234
}
235
235
}
236
236
237
237
/// User "hpm21" Enable
238
238
#[ inline]
239
- pub fn hpm21 ( & self ) -> bool {
239
+ pub fn hpm21 ( & self ) -> State {
240
240
match self . bits . get_bit ( 21 ) {
241
- true => state :: Enabled ,
242
- false => state :: Disabled ,
241
+ true => State :: Enabled ,
242
+ false => State :: Disabled ,
243
243
}
244
244
}
245
245
246
246
/// User "hpm22" Enable
247
247
#[ inline]
248
- pub fn hpm22 ( & self ) -> bool {
248
+ pub fn hpm22 ( & self ) -> State {
249
249
match self . bits . get_bit ( 22 ) {
250
- true => state :: Enabled ,
251
- false => state :: Disabled ,
250
+ true => State :: Enabled ,
251
+ false => State :: Disabled ,
252
252
}
253
253
}
254
254
255
255
/// User "hpm23" Enable
256
256
#[ inline]
257
- pub fn hpm23 ( & self ) -> bool {
257
+ pub fn hpm23 ( & self ) -> State {
258
258
match self . bits . get_bit ( 23 ) {
259
- true => state :: Enabled ,
260
- false => state :: Disabled ,
259
+ true => State :: Enabled ,
260
+ false => State :: Disabled ,
261
261
}
262
262
}
263
263
264
264
/// User "hpm24" Enable
265
265
#[ inline]
266
- pub fn hpm24 ( & self ) -> bool {
266
+ pub fn hpm24 ( & self ) -> State {
267
267
match self . bits . get_bit ( 24 ) {
268
- true => state :: Enabled ,
269
- false => state :: Disabled ,
268
+ true => State :: Enabled ,
269
+ false => State :: Disabled ,
270
270
}
271
271
}
272
272
273
273
/// User "hpm25" Enable
274
274
#[ inline]
275
- pub fn hpm25 ( & self ) -> bool {
275
+ pub fn hpm25 ( & self ) -> State {
276
276
match self . bits . get_bit ( 25 ) {
277
- true => state :: Enabled ,
278
- false => state :: Disabled ,
277
+ true => State :: Enabled ,
278
+ false => State :: Disabled ,
279
279
}
280
280
}
281
281
282
282
/// User "hpm26" Enable
283
283
#[ inline]
284
- pub fn hpm26 ( & self ) -> bool {
284
+ pub fn hpm26 ( & self ) -> State {
285
285
match self . bits . get_bit ( 26 ) {
286
- true => state :: Enabled ,
287
- false => state :: Disabled ,
286
+ true => State :: Enabled ,
287
+ false => State :: Disabled ,
288
288
}
289
289
}
290
290
291
291
/// User "hpm27" Enable
292
292
#[ inline]
293
- pub fn hpm27 ( & self ) -> bool {
293
+ pub fn hpm27 ( & self ) -> State {
294
294
match self . bits . get_bit ( 27 ) {
295
- true => state :: Enabled ,
296
- false => state :: Disabled ,
295
+ true => State :: Enabled ,
296
+ false => State :: Disabled ,
297
297
}
298
298
}
299
299
300
300
/// User "hpm24" Enable
301
301
#[ inline]
302
- pub fn hpm28 ( & self ) -> bool {
302
+ pub fn hpm28 ( & self ) -> State {
303
303
match self . bits . get_bit ( 28 ) {
304
- true => state :: Enabled ,
305
- false => state :: Disabled ,
304
+ true => State :: Enabled ,
305
+ false => State :: Disabled ,
306
306
}
307
307
}
308
308
309
309
/// User "hpm29" Enable
310
310
#[ inline]
311
- pub fn hpm29 ( & self ) -> bool {
311
+ pub fn hpm29 ( & self ) -> State {
312
312
match self . bits . get_bit ( 29 ) {
313
- true => state :: Enabled ,
314
- false => state :: Disabled ,
313
+ true => State :: Enabled ,
314
+ false => State :: Disabled ,
315
315
}
316
316
}
317
317
318
318
/// User "hpm30" Enable
319
319
#[ inline]
320
- pub fn hpm30 ( & self ) -> bool {
320
+ pub fn hpm30 ( & self ) -> State {
321
321
match self . bits . get_bit ( 30 ) {
322
- true => state :: Enabled ,
323
- false => state :: Disabled ,
322
+ true => State :: Enabled ,
323
+ false => State :: Disabled ,
324
324
}
325
325
}
326
326
327
327
/// User "hpm31" Enable
328
328
#[ inline]
329
- pub fn hpm31 ( & self ) -> bool {
329
+ pub fn hpm31 ( & self ) -> State {
330
330
match self . bits . get_bit ( 31 ) {
331
- true => state :: Enabled ,
332
- false => state :: Disabled ,
331
+ true => State :: Enabled ,
332
+ false => State :: Disabled ,
333
333
}
334
334
}
335
335
@@ -451,7 +451,7 @@ impl Mcounteren {
451
451
452
452
set_clear_csr ! (
453
453
/// User hpmcounter27 Enable
454
- , set_hpm27, clear_hpm24 , 1 << 27 ) ;
454
+ , set_hpm27, clear_hpm27 , 1 << 27 ) ;
455
455
456
456
set_clear_csr ! (
457
457
/// User hpmcounter28 Enable
0 commit comments