fix up arduino-0022 a bit
This commit is contained in:
		
							parent
							
								
									db55ca4bf7
								
							
						
					
					
						commit
						da63707eed
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue