|
|
|
@ -23,6 +23,7 @@
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "wiring_private.h"
|
|
|
|
|
#include <avr/delay.h>
|
|
|
|
|
|
|
|
|
|
// the prescaler is set so that timer0 ticks every 64 clock cycles, and the
|
|
|
|
|
// the overflow handler is called every 256 ticks.
|
|
|
|
@ -104,6 +105,7 @@ unsigned long micros() {
|
|
|
|
|
|
|
|
|
|
void delay(unsigned long ms)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
uint16_t start = (uint16_t)micros();
|
|
|
|
|
|
|
|
|
|
while (ms > 0) {
|
|
|
|
@ -112,6 +114,8 @@ void delay(unsigned long ms)
|
|
|
|
|
start += 1000;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
_delay_ms(ms);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Delay for the given number of microseconds. Assumes a 8 or 16 MHz clock. */
|
|
|
|
|