diff options
author | utzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-07-08 19:05:06 +0000 |
---|---|---|
committer | utzig <utzig@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-07-08 19:05:06 +0000 |
commit | d50ca14a21ef325f1e4e37b1adb0500a194a0561 (patch) | |
tree | d250a61b784000abbaf66a55cce5c8846223e48a /os/nil/ports/AVR | |
parent | c4eab50690506d07ac5760c280ba93d0a18911cc (diff) | |
download | ChibiOS-d50ca14a21ef325f1e4e37b1adb0500a194a0561.tar.gz ChibiOS-d50ca14a21ef325f1e4e37b1adb0500a194a0561.tar.bz2 ChibiOS-d50ca14a21ef325f1e4e37b1adb0500a194a0561.zip |
Fixed indexing of context offset inside thread_t (was chibios's thread_t based...)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7021 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil/ports/AVR')
-rw-r--r-- | os/nil/ports/AVR/nilcore.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/os/nil/ports/AVR/nilcore.c b/os/nil/ports/AVR/nilcore.c index eb762b00b..8c115c17f 100644 --- a/os/nil/ports/AVR/nilcore.c +++ b/os/nil/ports/AVR/nilcore.c @@ -67,7 +67,7 @@ #if !defined(__DOXYGEN__)
__attribute__((naked, weak))
#endif
-void port_switch(Thread *ntp, Thread *otp) {
+void _port_switch(thread_t *ntp, thread_t *otp) {
asm volatile ("push r2");
asm volatile ("push r3");
@@ -90,14 +90,14 @@ void port_switch(Thread *ntp, Thread *otp) { asm volatile ("movw r30, r22");
asm volatile ("in r0, 0x3d");
- asm volatile ("std Z+5, r0");
+ asm volatile ("std Z+0, r0");
asm volatile ("in r0, 0x3e");
- asm volatile ("std Z+6, r0");
+ asm volatile ("std Z+1, r0");
asm volatile ("movw r30, r24");
- asm volatile ("ldd r0, Z+5");
+ asm volatile ("ldd r0, Z+0");
asm volatile ("out 0x3d, r0");
- asm volatile ("ldd r0, Z+6");
+ asm volatile ("ldd r0, Z+1");
asm volatile ("out 0x3e, r0");
asm volatile ("pop r29");
|