1212 |
kakl |
1 |
|
|
|
2 |
//***************************************************************************** |
|
|
3 |
// |
|
|
4 |
// File Name : 'global.h' |
|
|
5 |
// Title : AVR project global include |
|
|
6 |
// Author : Pascal Stang |
|
|
7 |
// Created : 7/12/2001 |
|
|
8 |
// Revised : 9/30/2002 |
|
|
9 |
// Version : 1.1 |
|
|
10 |
// Target MCU : Atmel AVR series |
|
|
11 |
// Editor Tabs : 4 |
|
|
12 |
// |
|
|
13 |
// Description : This include file is designed to contain items useful to all |
|
|
14 |
// code files and projects. |
|
|
15 |
// |
|
|
16 |
// This code is distributed under the GNU Public License |
|
|
17 |
// which can be found at http://www.gnu.org/licenses/gpl.txt |
|
|
18 |
// |
|
|
19 |
//***************************************************************************** |
|
|
20 |
|
|
|
21 |
#ifndef GLOBAL_H |
|
|
22 |
#define GLOBAL_H |
|
|
23 |
// |
|
|
24 |
// global AVRLIB defines |
|
|
25 |
#include "avrlibdefs.h" |
|
|
26 |
// global AVRLIB types definitions |
|
|
27 |
#include "avrlibtypes.h" |
|
|
28 |
|
|
|
29 |
// project/system dependent defines |
|
|
30 |
|
|
|
31 |
// back-door way to enable floating-point print support |
|
|
32 |
#define RPRINTF_FLOAT |
|
|
33 |
|
|
|
34 |
// CPU clock speed |
|
|
35 |
//#define F_CPU 16000000 // 16MHz processor |
|
|
36 |
//#define F_CPU 14745000 // 14.745MHz processor |
|
|
37 |
#define F_CPU 8000000 // 8MHz processor |
|
|
38 |
//#define F_CPU 7372800 // 7.37MHz processor |
|
|
39 |
//#define F_CPU 4000000 // 4MHz processor |
|
|
40 |
//#define F_CPU 3686400 // 3.69MHz processor |
|
|
41 |
//#define F_CPU 1000000 |
|
|
42 |
|
|
|
43 |
|
|
|
44 |
#define CYCLES_PER_US ((F_CPU+500000)/1000000) // cpu cycles per microsecond |
|
|
45 |
|
|
|
46 |
#endif |