5c6018f0e2
This currently supports the stm32f107, but support will be added for the F105 shortly (missing a linker script and I can't properly test without a devkit).
13 lines
154 B
C
13 lines
154 B
C
#include <stdint.h>
|
|
|
|
uint32_t retval;
|
|
|
|
uint32_t
|
|
get_msp(void)
|
|
{
|
|
asm("ldr r1, =retval");
|
|
asm("mrs r0, msp");
|
|
asm("str r0, [r1]");
|
|
return retval;
|
|
}
|