We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55da7d8 commit 7e0e4deCopy full SHA for 7e0e4de
arch/arm/include/arm/irq.h
@@ -256,6 +256,25 @@ static inline_function void up_set_interrupt_context(bool flag)
256
#endif
257
}
258
259
+static inline_function uint32_t up_getsp(void)
260
+{
261
+ register uint32_t sp;
262
+
263
+ __asm__ __volatile__
264
+ (
265
+ "mov %0, sp\n"
266
+ : "=r" (sp)
267
+ );
268
269
+ return sp;
270
+}
271
272
+static inline_function uintptr_t up_getusrsp(void *regs)
273
274
+ uint32_t *ptr = (uint32_t *)regs;
275
+ return ptr[REG_SP];
276
277
278
/****************************************************************************
279
* Public Function Prototypes
280
****************************************************************************/
0 commit comments