Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
151 kaklik 1
/*
2
    Copyright (C) 2004    John Orlando
3
 
4
   AVRcam: a small real-time image processing engine.
5
 
6
    This program is free software; you can redistribute it and/or
7
    modify it under the terms of the GNU General Public
8
    License as published by the Free Software Foundation; either
9
    version 2 of the License, or (at your option) any later version.
10
 
11
    This program is distributed in the hope that it will be useful,
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
    General Public License for more details.
15
 
16
    You should have received a copy of the GNU General Public
17
    License along with this program; if not, write to the Free Software
18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 
20
   For more information on the AVRcam, please contact:
21
 
22
   john@jrobot.net
23
 
24
   or go to www.jrobot.net for more details regarding the system.
25
*/
26
/***********************************************************
27
	Module Name: Main.c
28
	Module Date: 04/10/2004
29
	Module Auth: John Orlando
30
 
31
	Description:  This module is responsible for providing 
32
	the entry point to the code through the "main" function.
33
 
34
    Revision History:
35
    Date        Rel Ver.    Notes
36
    4/10/2004      0.1     Module created
37
    6/30/2004      1.0     Initial release for Circuit Cellar
38
                           contest.
39
***********************************************************/
40
 
41
/*	Includes */
42
#include <avr/io.h>
43
#include <stdlib.h>
44
#include <string.h>
45
#include "UIMgr.h"
46
#include "UartInterface.h" 
47
#include "I2CInterface.h"
48
#include "CamInterface.h"
49
#include "DebugInterface.h"
50
#include "FrameMgr.h"
51
#include "CommonDefs.h" 
52
#include "CamConfig.h" 
53
#include "Executive.h" 
54
#include "Utility.h"
55
 
56
/* 	Local Structures and Typedefs */
57
 
58
/*  Extern Variables */
59
 
60
/*  Definitions */
61
 
62
/***********************************************************
63
	Function Name: main
64
	Function Description: This function provides the entry
65
	point into AVRcam application.
66
	Inputs:  none
67
	Outputs: int
68
***********************************************************/	
69
int main(void)
70
{
71
	/* initialize all of the interface modules */
72
	DebugInt_init();
73
	UartInt_init();
74
	I2CInt_init();
75
	CamInt_init();
76
 
77
	/* initialize the remaining modules that will process
78
	data...interrupts need to be on for these */
79
	ENABLE_INTS();
80
	CamConfig_init(); 
81
	UIMgr_init();
82
	FrameMgr_init();
83
 
84
	/* provide a short delay for the camera to stabilize before
85
	we let the executive start up */
86
	Utility_delay(1000);
87
 
88
	/* the rest of the application will be under the
89
	control of the Executive.  */
90
	Exec_run();	
91
 
92
	/* this should never be reached */
93
	return(0);
94
}
95