2 clock.h - part of USBasp
4 Autor..........: Thomas Fischl <tfischl@gmx.de>
5 Description....: Provides functions for timing/waiting
6 Licence........: Free under certain conditions. See Documentation.
7 Creation Date..: 2005-02-23
8 Last change....: 2006-11-16
11 #ifndef __clock_h_included__
12 #define __clock_h_included__
14 #define F_CPU 12000000L /* 12MHz */
15 #define TIMERVALUE TCNT0
16 #define CLOCK_T_320us 60
18 #ifdef __AVR_ATmega8__
22 /* set prescaler to 64 */
23 #define clockInit() TCCR0B = (1 << CS01) | (1 << CS00);
25 /* wait time * 320 us */
26 void clockWait(uint8_t time
);
28 #endif /* __clock_h_included__ */