Subversion Repositories svnkaklik

Rev

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

Rev Author Line No. Line
151 kaklik 1
#ifndef EVENTS_H
2
#define EVENTS_H
3
 
4
/*
5
    Copyright (C) 2004    John Orlando
6
 
7
   AVRcam: a small real-time image processing engine.
8
 
9
    This program is free software; you can redistribute it and/or
10
    modify it under the terms of the GNU General Public
11
    License as published by the Free Software Foundation; either
12
    version 2 of the License, or (at your option) any later version.
13
 
14
    This program is distributed in the hope that it will be useful,
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
    General Public License for more details.
18
 
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
21
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
 
23
   For more information on the AVRcam, please contact:
24
 
25
   john@jrobot.net
26
 
27
   or go to www.jrobot.net for more details regarding the system.
28
*/
29
/*********************************************************** 
30
	Module Name: Events.h
31
	Module Date: 05/23/2004
32
	Module Auth: John Orlando
33
 
34
	Description: This file provides the external interface
35
	to the events that can be published/processed in the
36
	system.  It is specifically by itself (and nothing
37
	else should be defined in here) so that both .c and
38
	.S (assembly) files can include this file without
39
	a problem.
40
 
41
    Revision History:
42
    Date        Rel Ver.    Notes
43
    4/10/2004      0.1     Module created
44
    6/30/2004      1.0     Initial release for Circuit Cellar
45
                           contest.
46
    *******************************************************/
47
 
48
/* Definitions */
49
/* Originally, all events were passed in a bitmask...however,
50
an event FIFO was finally used, but the coding of the event
51
definitions were never translated back....doesn't make a
52
difference, but looks a little weird */
53
#define EV_SERIAL_DATA_RECEIVED		0x01
54
#define EV_DUMP_FRAME				0x02
55
#define EV_PROCESS_FRAME_COMPLETE	0x04
56
#define EV_PROCESS_LINE_COMPLETE    0x08
57
#define EV_ACQUIRE_LINE_COMPLETE	0x10
58
#define EV_ACQUIRE_FRAME_COMPLETE	0x20
59
#define EV_CONFIGURE_CAMERA			0x40
60
#define EV_ENABLE_TRACKING			0x80
61
#define EV_DISABLE_TRACKING			0x81
62
#define EV_SERIAL_DATA_PENDING_TX	0x90
63
#define EV_RED_COLOR_MAP_RECEIVED	0x91
64
#define EV_BLUE_COLOR_MAP_RECEIVED	0x92
65
#define EV_GREEN_COLOR_MAP_RECEIVED	0x93
66
 
67
/* This is used to pass fast events through the system
68
so there is a minimum of processing time needed
69
between lines of tracking data */
70
#define FEV_ACQUIRE_LINE_COMPLETE 	0x01
71
#define FEV_PROCESS_LINE_COMPLETE 	0x02
72
 
73
/* This is needed for the event fifo */
74
#define EXEC_EVENT_FIFO_SIZE 8
75
#define EXEC_EVENT_FIFO_MASK EXEC_EVENT_FIFO_SIZE-1 
76
 
77
#endif
78