Subversion Repositories svnkaklik

Rev

Rev 409 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 409 Rev 410
1
#ifndef COMMONDEFS_H
1
#ifndef COMMONDEFS_H
2
#define COMMONDEFS_H
2
#define COMMONDEFS_H
3
 
3
 
4
/*
4
/*
5
    Copyright (C) 2004    John Orlando
5
    Copyright (C) 2004    John Orlando
6
    
6
    
7
   AVRcam: a small real-time image processing engine.
7
   AVRcam: a small real-time image processing engine.
8
 
8
 
9
    This program is free software; you can redistribute it and/or
9
    This program is free software; you can redistribute it and/or
10
    modify it under the terms of the GNU General Public
10
    modify it under the terms of the GNU General Public
11
    License as published by the Free Software Foundation; either
11
    License as published by the Free Software Foundation; either
12
    version 2 of the License, or (at your option) any later version.
12
    version 2 of the License, or (at your option) any later version.
13
 
13
 
14
    This program is distributed in the hope that it will be useful,
14
    This program is distributed in the hope that it will be useful,
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
    General Public License for more details.
17
    General Public License for more details.
18
 
18
 
19
    You should have received a copy of the GNU General Public
19
    You should have received a copy of the GNU General Public
20
    License along with this program; if not, write to the Free Software
20
    License along with this program; if not, write to the Free Software
21
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
 
22
 
23
   For more information on the AVRcam, please contact:
23
   For more information on the AVRcam, please contact:
24
 
24
 
25
   john@jrobot.net
25
   john@jrobot.net
26
 
26
 
27
   or go to www.jrobot.net for more details regarding the system.
27
   or go to www.jrobot.net for more details regarding the system.
28
*/
28
*/
29
/***********************************************************
29
/***********************************************************
30
	Module Name: CommonDefs.h
30
	Module Name: CommonDefs.h
31
	Module Date: 04/10/2004
31
	Module Date: 04/10/2004
32
	Module Auth: John Orlando
32
	Module Auth: John Orlando
33
	
33
	
34
	Description: This module provides some of the generic
34
	Description: This module provides some of the generic
35
	definitions and declarations needed by the AVRcam 
35
	definitions and declarations needed by the AVRcam 
36
	system.
36
	system.
37
    
37
    
38
    Revision History:
38
    Revision History:
39
    Date        Rel Ver.    Notes
39
    Date        Rel Ver.    Notes
40
    4/10/2004      0.1     Module created
40
    4/10/2004      0.1     Module created
41
    6/30/2004      1.0     Initial release for Circuit Cellar
41
    6/30/2004      1.0     Initial release for Circuit Cellar
42
                           contest.
42
                           contest.
43
    11/15/2004     1.2     Added the NO_CRYSTAL definition
43
    11/15/2004     1.2     Added the NO_CRYSTAL definition
44
                           for when the OV6620 is providing
44
                           for when the OV6620 is providing
45
                           the mega8's clock source.
45
                           the mega8's clock source.
46
***********************************************************/
46
***********************************************************/
47
 
47
 
48
#include <avr/interrupt.h>
48
#include <avr/interrupt.h>
49
	
49
	
50
/*  Defines  */
50
/*  Defines  */
51
/* 	FOSC defines the frequency of the crystal connected to
51
/* 	FOSC defines the frequency of the crystal connected to
52
	the mega8, supplying the instruction clock cycle */
52
	the mega8, supplying the instruction clock cycle */
53
#define FOSC 16000000
53
#define FOSC 16000000
54
 
54
 
55
/* For defining boolean operations */
55
/* For defining boolean operations */
56
typedef unsigned char bool_t;
56
typedef unsigned char bool_t;
57
#define TRUE  1
57
#define TRUE  1
58
#define FALSE 0 
58
#define FALSE 0 
59
 
59
 
60
#define BIT0 0
60
#define BIT0 0
61
#define BIT1 1
61
#define BIT1 1
62
#define BIT2 2 
62
#define BIT2 2 
63
#define BIT3 3
63
#define BIT3 3
64
#define BIT4 4
64
#define BIT4 4
65
#define BIT5 5
65
#define BIT5 5
66
#define BIT6 6
66
#define BIT6 6
67
#define BIT7 7
67
#define BIT7 7
68
 
68
 
69
#define DISABLE_INTS() cli()
69
#define DISABLE_INTS() cli()
70
#define ENABLE_INTS()  sei()
70
#define ENABLE_INTS()  sei()
71
 
71
 
72
//#define SIMULATION 	1
72
//#define SIMULATION 	1
73
//#define SLOW_FRAMES	1
73
//#define SLOW_FRAMES	1
74
//#define DEBUG_FRAME_DATA 1
74
//#define DEBUG_FRAME_DATA 1
75
//#define DEBUG_TRACKED_LINE 1
75
//#define DEBUG_TRACKED_LINE 1
76
//#define DEBUG_COLOR_MAP 1
76
//#define DEBUG_COLOR_MAP 1
77
#define COMPLETE_COLOR_MAP 1
77
#define COMPLETE_COLOR_MAP 1
78
#define NO_CRYSTAL 1
78
#define NO_CRYSTAL 1
79
	
79
	
80
#endif	
80
#endif	
81
 
81