mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-09 23:54:32 +00:00
Changed clock_delay to use the nop instruction
This commit is contained in:
parent
b6fd166155
commit
09082f02fe
@ -272,17 +272,9 @@ clock_init(void)
|
|||||||
void
|
void
|
||||||
clock_delay(unsigned int i)
|
clock_delay(unsigned int i)
|
||||||
{
|
{
|
||||||
asm("add #-1, r15");
|
while(i--) {
|
||||||
asm("jnz $-2");
|
asm("nop");
|
||||||
/*
|
}
|
||||||
* This means that delay(i) will delay the CPU for CONST + 3x
|
|
||||||
* cycles. On a 2.4756 CPU, this means that each i adds 1.22us of
|
|
||||||
* delay.
|
|
||||||
*
|
|
||||||
* do {
|
|
||||||
* --i;
|
|
||||||
* } while(i > 0);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user