mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-19 13:54:23 +01:00
Commented out idle loop in timer (was giving problems under Linux) and added comments.
This commit is contained in:
parent
6b17c6ec36
commit
38ee1b7330
@ -228,13 +228,17 @@ void timerPause(unsigned short pause_ms)
|
||||
|
||||
// loop until time expires
|
||||
while( ((TimerPauseReg<<8) | inb(TCNT0)) < (pause+timerThres) )
|
||||
{
|
||||
if( TimerPauseReg < (pause>>8));
|
||||
{
|
||||
{
|
||||
// DAM: these lines (in particular, the call to set_sleep_mode)
|
||||
// caused avr-gcc to give an error about a misplaced } in linux,
|
||||
// presumambly caused by a macro somewhere. Since they're not
|
||||
// vital (and are causing problems), I'm commenting them out.
|
||||
//if( TimerPauseReg < (pause>>8));
|
||||
//{
|
||||
// save power by idling the processor
|
||||
set_sleep_mode(SLEEP_MODE_IDLE);
|
||||
sleep_mode();
|
||||
}
|
||||
//set_sleep_mode(SLEEP_MODE_IDLE);
|
||||
//sleep_mode();
|
||||
//}
|
||||
}
|
||||
|
||||
/* old inaccurate code, for reference
|
||||
|
@ -257,7 +257,9 @@ void printBinary(unsigned int n)
|
||||
printIntegerInBase(n, 2);
|
||||
}
|
||||
|
||||
/* Including print() adds approximately 1500 bytes to the binary size.
|
||||
/* Including print() adds approximately 1500 bytes to the binary size,
|
||||
* so we replace it with the smaller and less-confusing printString(),
|
||||
* printInteger(), etc.
|
||||
void print(const char *format, ...)
|
||||
{
|
||||
char buf[256];
|
||||
|
Loading…
x
Reference in New Issue
Block a user