@@ -158,6 +158,7 @@ impl Peripherals {
158
158
}
159
159
160
160
/// Unchecked version of `Peripherals::take`
161
+ #[ inline]
161
162
pub unsafe fn steal ( ) -> Self {
162
163
CORE_PERIPHERALS = true ;
163
164
@@ -211,13 +212,15 @@ unsafe impl Send for CBP {}
211
212
212
213
#[ cfg( not( armv6m) ) ]
213
214
impl CBP {
215
+ #[ inline( always) ]
214
216
pub ( crate ) unsafe fn new ( ) -> Self {
215
217
CBP {
216
218
_marker : PhantomData ,
217
219
}
218
220
}
219
221
220
222
/// Returns a pointer to the register block
223
+ #[ inline( always) ]
221
224
pub fn ptr ( ) -> * const self :: cbp:: RegisterBlock {
222
225
0xE000_EF50 as * const _
223
226
}
@@ -227,6 +230,7 @@ impl CBP {
227
230
impl ops:: Deref for CBP {
228
231
type Target = self :: cbp:: RegisterBlock ;
229
232
233
+ #[ inline( always) ]
230
234
fn deref ( & self ) -> & Self :: Target {
231
235
unsafe { & * Self :: ptr ( ) }
232
236
}
@@ -241,6 +245,7 @@ unsafe impl Send for CPUID {}
241
245
242
246
impl CPUID {
243
247
/// Returns a pointer to the register block
248
+ #[ inline( always) ]
244
249
pub fn ptr ( ) -> * const self :: cpuid:: RegisterBlock {
245
250
0xE000_ED00 as * const _
246
251
}
@@ -249,6 +254,7 @@ impl CPUID {
249
254
impl ops:: Deref for CPUID {
250
255
type Target = self :: cpuid:: RegisterBlock ;
251
256
257
+ #[ inline( always) ]
252
258
fn deref ( & self ) -> & Self :: Target {
253
259
unsafe { & * Self :: ptr ( ) }
254
260
}
@@ -263,6 +269,7 @@ unsafe impl Send for DCB {}
263
269
264
270
impl DCB {
265
271
/// Returns a pointer to the register block
272
+ #[ inline( always) ]
266
273
pub fn ptr ( ) -> * const dcb:: RegisterBlock {
267
274
0xE000_EDF0 as * const _
268
275
}
@@ -271,6 +278,7 @@ impl DCB {
271
278
impl ops:: Deref for DCB {
272
279
type Target = self :: dcb:: RegisterBlock ;
273
280
281
+ #[ inline( always) ]
274
282
fn deref ( & self ) -> & Self :: Target {
275
283
unsafe { & * DCB :: ptr ( ) }
276
284
}
@@ -285,6 +293,7 @@ unsafe impl Send for DWT {}
285
293
286
294
impl DWT {
287
295
/// Returns a pointer to the register block
296
+ #[ inline( always) ]
288
297
pub fn ptr ( ) -> * const dwt:: RegisterBlock {
289
298
0xE000_1000 as * const _
290
299
}
@@ -293,6 +302,7 @@ impl DWT {
293
302
impl ops:: Deref for DWT {
294
303
type Target = self :: dwt:: RegisterBlock ;
295
304
305
+ #[ inline( always) ]
296
306
fn deref ( & self ) -> & Self :: Target {
297
307
unsafe { & * Self :: ptr ( ) }
298
308
}
@@ -308,6 +318,7 @@ unsafe impl Send for FPB {}
308
318
#[ cfg( not( armv6m) ) ]
309
319
impl FPB {
310
320
/// Returns a pointer to the register block
321
+ #[ inline( always) ]
311
322
pub fn ptr ( ) -> * const fpb:: RegisterBlock {
312
323
0xE000_2000 as * const _
313
324
}
@@ -317,6 +328,7 @@ impl FPB {
317
328
impl ops:: Deref for FPB {
318
329
type Target = self :: fpb:: RegisterBlock ;
319
330
331
+ #[ inline( always) ]
320
332
fn deref ( & self ) -> & Self :: Target {
321
333
unsafe { & * Self :: ptr ( ) }
322
334
}
@@ -332,6 +344,7 @@ unsafe impl Send for FPU {}
332
344
#[ cfg( any( has_fpu, target_arch = "x86_64" ) ) ]
333
345
impl FPU {
334
346
/// Returns a pointer to the register block
347
+ #[ inline( always) ]
335
348
pub fn ptr ( ) -> * const fpu:: RegisterBlock {
336
349
0xE000_EF30 as * const _
337
350
}
@@ -341,6 +354,7 @@ impl FPU {
341
354
impl ops:: Deref for FPU {
342
355
type Target = self :: fpu:: RegisterBlock ;
343
356
357
+ #[ inline( always) ]
344
358
fn deref ( & self ) -> & Self :: Target {
345
359
unsafe { & * Self :: ptr ( ) }
346
360
}
@@ -356,6 +370,7 @@ unsafe impl Send for ITM {}
356
370
#[ cfg( not( armv6m) ) ]
357
371
impl ITM {
358
372
/// Returns a pointer to the register block
373
+ #[ inline( always) ]
359
374
pub fn ptr ( ) -> * mut itm:: RegisterBlock {
360
375
0xE000_0000 as * mut _
361
376
}
@@ -365,13 +380,15 @@ impl ITM {
365
380
impl ops:: Deref for ITM {
366
381
type Target = self :: itm:: RegisterBlock ;
367
382
383
+ #[ inline( always) ]
368
384
fn deref ( & self ) -> & Self :: Target {
369
385
unsafe { & * Self :: ptr ( ) }
370
386
}
371
387
}
372
388
373
389
#[ cfg( not( armv6m) ) ]
374
390
impl ops:: DerefMut for ITM {
391
+ #[ inline( always) ]
375
392
fn deref_mut ( & mut self ) -> & mut Self :: Target {
376
393
unsafe { & mut * Self :: ptr ( ) }
377
394
}
@@ -386,6 +403,7 @@ unsafe impl Send for MPU {}
386
403
387
404
impl MPU {
388
405
/// Returns a pointer to the register block
406
+ #[ inline( always) ]
389
407
pub fn ptr ( ) -> * const mpu:: RegisterBlock {
390
408
0xE000_ED90 as * const _
391
409
}
@@ -394,6 +412,7 @@ impl MPU {
394
412
impl ops:: Deref for MPU {
395
413
type Target = self :: mpu:: RegisterBlock ;
396
414
415
+ #[ inline( always) ]
397
416
fn deref ( & self ) -> & Self :: Target {
398
417
unsafe { & * Self :: ptr ( ) }
399
418
}
@@ -408,6 +427,7 @@ unsafe impl Send for NVIC {}
408
427
409
428
impl NVIC {
410
429
/// Returns a pointer to the register block
430
+ #[ inline( always) ]
411
431
pub fn ptr ( ) -> * const nvic:: RegisterBlock {
412
432
0xE000_E100 as * const _
413
433
}
@@ -416,6 +436,7 @@ impl NVIC {
416
436
impl ops:: Deref for NVIC {
417
437
type Target = self :: nvic:: RegisterBlock ;
418
438
439
+ #[ inline( always) ]
419
440
fn deref ( & self ) -> & Self :: Target {
420
441
unsafe { & * Self :: ptr ( ) }
421
442
}
@@ -430,6 +451,7 @@ unsafe impl Send for SCB {}
430
451
431
452
impl SCB {
432
453
/// Returns a pointer to the register block
454
+ #[ inline( always) ]
433
455
pub fn ptr ( ) -> * const scb:: RegisterBlock {
434
456
0xE000_ED04 as * const _
435
457
}
@@ -438,6 +460,7 @@ impl SCB {
438
460
impl ops:: Deref for SCB {
439
461
type Target = self :: scb:: RegisterBlock ;
440
462
463
+ #[ inline( always) ]
441
464
fn deref ( & self ) -> & Self :: Target {
442
465
unsafe { & * Self :: ptr ( ) }
443
466
}
@@ -452,6 +475,7 @@ unsafe impl Send for SYST {}
452
475
453
476
impl SYST {
454
477
/// Returns a pointer to the register block
478
+ #[ inline( always) ]
455
479
pub fn ptr ( ) -> * const syst:: RegisterBlock {
456
480
0xE000_E010 as * const _
457
481
}
@@ -460,6 +484,7 @@ impl SYST {
460
484
impl ops:: Deref for SYST {
461
485
type Target = self :: syst:: RegisterBlock ;
462
486
487
+ #[ inline( always) ]
463
488
fn deref ( & self ) -> & Self :: Target {
464
489
unsafe { & * Self :: ptr ( ) }
465
490
}
@@ -475,6 +500,7 @@ unsafe impl Send for TPIU {}
475
500
#[ cfg( not( armv6m) ) ]
476
501
impl TPIU {
477
502
/// Returns a pointer to the register block
503
+ #[ inline( always) ]
478
504
pub fn ptr ( ) -> * const tpiu:: RegisterBlock {
479
505
0xE004_0000 as * const _
480
506
}
@@ -484,6 +510,7 @@ impl TPIU {
484
510
impl ops:: Deref for TPIU {
485
511
type Target = self :: tpiu:: RegisterBlock ;
486
512
513
+ #[ inline( always) ]
487
514
fn deref ( & self ) -> & Self :: Target {
488
515
unsafe { & * Self :: ptr ( ) }
489
516
}
0 commit comments