git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@41 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2007-10-06 10:22:07 +00:00
parent 00c6f5ea40
commit cb5757e032
2 changed files with 15 additions and 8 deletions

View File

@ -19,8 +19,23 @@
#include <ch.h>
void chSysPause(void) {
chThdSetPriority(IDLEPRIO);
asm volatile (
"ldi r18, 1 \n\t" // SE bit
"out 0x33, r18 \n" // SMCR
);
while (TRUE) {
asm volatile ("sleep\n\t");
}
}
void chSysHalt(void) {
chSysLock();
while (TRUE)
;
}

View File

@ -19,14 +19,6 @@
#include <avr/io.h>
.global chSysPause
chSysPause:
ldi r18, (1 << SE)
out _SFR_IO_ADDR(SMCR), r18
stay:
sleep
rjmp stay
.global chSysSwitchI
chSysSwitchI:
push r2