osd-contiki/cpu/arm/stm32f1x_cl/util.c
Jeff Ciesielski 5c6018f0e2 stm32f1x_cl: Add initial support for STM32F1x connectivity line
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).
2013-02-06 15:41:50 -08:00

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;
}