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