Subversion Repositories svnkaklik

Rev

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

Rev 151 Rev 409
1
#ifndef CAMCONFIG_H
1
#ifndef CAMCONFIG_H
2
#define CAMCONFIG_H
2
#define CAMCONFIG_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: CamConfig.h
30
	Module Name: CamConfig.h
31
	Module Date: 04/12/2004
31
	Module Date: 04/12/2004
32
	Module Auth: John Orlando
32
	Module Auth: John Orlando
33
	
33
	
34
	Description: This file provides the external interface
34
	Description: This file provides the external interface
35
	to the CamConfig module.
35
	to the CamConfig module.
36
    
36
    
37
    Revision History:
37
    Revision History:
38
    Date        Rel Ver.    Notes
38
    Date        Rel Ver.    Notes
39
    4/10/2004      0.1     Module created
39
    4/10/2004      0.1     Module created
40
    6/30/2004      1.0     Initial release for Circuit Cellar
40
    6/30/2004      1.0     Initial release for Circuit Cellar
41
                           contest.
41
                           contest.
42
***********************************************************/
42
***********************************************************/
43
 
43
 
44
#include "I2CInterface.h"
44
#include "I2CInterface.h"
45
	
45
	
46
/* This is the I2C slave address of the OV6620 module.
46
/* This is the I2C slave address of the OV6620 module.
47
NOTE: The actual address of the camera is 0xC0.  However,
47
NOTE: The actual address of the camera is 0xC0.  However,
48
the TWI interface on the mega8 needs to have the address
48
the TWI interface on the mega8 needs to have the address
49
shifted one bit to the right, which yields 0x60.  The
49
shifted one bit to the right, which yields 0x60.  The
50
LSB is used to set whether the operation is read or 
50
LSB is used to set whether the operation is read or 
51
write. */
51
write. */
52
#define CAM_ADDRESS 0x60	
52
#define CAM_ADDRESS 0x60	
53
	
53
	
54
extern i2cCmd_t CamConfig_txFifo[];
54
extern i2cCmd_t CamConfig_txFifo[];
55
extern unsigned char 	CamConfig_txFifoHead;
55
extern unsigned char 	CamConfig_txFifoHead;
56
extern unsigned char 	CamConfig_txFifoTail;
56
extern unsigned char 	CamConfig_txFifoTail;
57
extern bool_t 			CamConfig_txComplete;
57
extern bool_t 			CamConfig_txComplete;
58
 
58
 
59
extern void  	CamConfig_init(void);
59
extern void  	CamConfig_init(void);
60
extern bool_t 	CamConfig_writeTxFifo(i2cCmd_t cmd);
60
extern bool_t 	CamConfig_writeTxFifo(i2cCmd_t cmd);
61
extern void  	CamConfig_setCamReg(unsigned char reg, unsigned char val);
61
extern void  	CamConfig_setCamReg(unsigned char reg, unsigned char val);
62
extern void  	CamConfig_sendFifoCmds(void);
62
extern void  	CamConfig_sendFifoCmds(void);
63
	
63
	
64
#endif	
64
#endif	
65
 
65