projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5311720
)
altos/lpc: Use separate interrupt stack
author
Keith Packard
<keithp@keithp.com>
Sat, 18 May 2013 10:21:43 +0000
(
03:21
-0700)
committer
Keith Packard
<keithp@keithp.com>
Sat, 18 May 2013 10:21:43 +0000
(
03:21
-0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/lpc/ao_arch_funcs.h
patch
|
blob
|
history
diff --git
a/src/lpc/ao_arch_funcs.h
b/src/lpc/ao_arch_funcs.h
index bc4c47ee57b4f60eb9d41c258a7ba5101fa1d7cb..3cd873ec89c3017a4364fbd063935e4d094be012 100644
(file)
--- a/
src/lpc/ao_arch_funcs.h
+++ b/
src/lpc/ao_arch_funcs.h
@@
-208,4
+208,17
@@
ao_spi_init(void);
} \
} while (0)
+#define HAS_ARCH_START_SCHEDULER 1
+
+static inline void ao_arch_start_scheduler(void) {
+ uint32_t sp;
+ uint32_t control;
+
+ asm("mrs %0,msp" : "=&r" (sp));
+ asm("msr psp,%0" : : "r" (sp));
+ asm("mrs %0,control" : "=&r" (control));
+ control |= (1 << 1);
+ asm("msr control,%0" : : "r" (control));
+}
+
#endif /* _AO_ARCH_FUNCS_H_ */