git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@41 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
00c6f5ea40
commit
cb5757e032
|
@ -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)
|
||||
;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue