Line 106:
Line 106:
|<code>uint32_t *OSGetStackPointer(void);</code>
|<code>uint32_t *OSGetStackPointer(void);</code>
|Returns the r1 register(aka "sp").
|Returns the r1 register(aka "sp").
+
|-
+
|OSSwitchStack
+
|<code>void OSSwitchStack(uint32_t *stackptr);</code>
+
|This basically sets the current thread's r1(aka sp) to the input address, and also calls internal coreinit functions with input_param=input_stackptr. Note that this overwrites data near the start of the specified address due to stack push/pop. This will return to the address LR was set to at function entry.
|}
|}