File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,20 @@ static always_inline_function void setcontrol(uint32_t control)
323
323
: "memory" );
324
324
}
325
325
326
+ static always_inline_function uint32_t getpsp (void )
327
+ {
328
+ uint32_t psp ;
329
+
330
+ __asm__ __volatile__
331
+ (
332
+ "\tmrs %0, psp\n"
333
+ : "=r" (psp )
334
+ :
335
+ : "memory" );
336
+
337
+ return psp ;
338
+ }
339
+
326
340
/****************************************************************************
327
341
* Name: up_cpu_index
328
342
*
Original file line number Diff line number Diff line change @@ -473,6 +473,20 @@ static always_inline_function void setcontrol(uint32_t control)
473
473
: "memory" );
474
474
}
475
475
476
+ static always_inline_function uint32_t getpsp (void )
477
+ {
478
+ uint32_t psp ;
479
+
480
+ __asm__ __volatile__
481
+ (
482
+ "\tmrs %0, psp\n"
483
+ : "=r" (psp )
484
+ :
485
+ : "memory" );
486
+
487
+ return psp ;
488
+ }
489
+
476
490
/****************************************************************************
477
491
* Name: up_cpu_index
478
492
*
Original file line number Diff line number Diff line change @@ -448,6 +448,20 @@ static always_inline_function void setcontrol(uint32_t control)
448
448
: "memory" );
449
449
}
450
450
451
+ static always_inline_function uint32_t getpsp (void )
452
+ {
453
+ uint32_t psp ;
454
+
455
+ __asm__ __volatile__
456
+ (
457
+ "\tmrs %0, psp\n"
458
+ : "=r" (psp )
459
+ :
460
+ : "memory" );
461
+
462
+ return psp ;
463
+ }
464
+
451
465
/****************************************************************************
452
466
* Name: up_cpu_index
453
467
*
You can’t perform that action at this time.
0 commit comments