Royce Pereira schreef:
Hi all,
In the latest WinAVR (avr-gcc (GCC) 4.1.2 (WinAVR 20070525) I found this.
Check this out:
//======================
void delay(unsigned del_cnt)
{
while(del_cnt--);
return;
}
//=======================
Well writing your own delay_loops is not recommended, because the
optimiser might optimise your loop away. Use <util/delay.h> instead.
Please note that delay.h might not work if compiling without optimiser
(but then again, your loop will not be gone)
HTH,
Wouter
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list