Subversion Repositories svnkaklik

Rev

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

Rev 409 Rev 410
1
#ifndef UIMGR_H
1
#ifndef UIMGR_H
2
#define UIMGR_H
2
#define UIMGR_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: UIMgr.h
30
	Module Name: UIMgr.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 file provides the external interface
34
	Description: This file provides the external interface
35
	to the UI Mgr.
35
	to the UI Mgr.
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
 
44
 
45
/* Defines */
45
/* Defines */
46
#define UI_MGR_RX_FIFO_SIZE 32 
46
#define UI_MGR_RX_FIFO_SIZE 32 
47
#define UI_MGR_RX_FIFO_MASK UI_MGR_RX_FIFO_SIZE-1 
47
#define UI_MGR_RX_FIFO_MASK UI_MGR_RX_FIFO_SIZE-1 
48
 
48
 
49
#define UI_MGR_TX_FIFO_SIZE 64
49
#define UI_MGR_TX_FIFO_SIZE 64
50
#define UI_MGR_TX_FIFO_MASK UI_MGR_TX_FIFO_SIZE-1
50
#define UI_MGR_TX_FIFO_MASK UI_MGR_TX_FIFO_SIZE-1
51
 
51
 
52
#define LENGTH_OF_UI_CMD 		2
52
#define LENGTH_OF_UI_CMD 		2
53
#define UI_MGR_MAX_CMD_LENGTH 	32
53
#define UI_MGR_MAX_CMD_LENGTH 	32
54
#define MAX_TOKEN_LENGTH		3   /* needs to hold 0 - 255 in ASCII format */
54
#define MAX_TOKEN_LENGTH		3   /* needs to hold 0 - 255 in ASCII format */
55
#define MAX_TOKEN_COUNT			64  /* for setting the color maps */
55
#define MAX_TOKEN_COUNT			64  /* for setting the color maps */
56
 
56
 
57
 
57
 
58
/* External Variable Reference */
58
/* External Variable Reference */
59
extern unsigned char UIMgr_rxFifo[];
59
extern unsigned char UIMgr_rxFifo[];
60
extern unsigned char UIMgr_rxFifoHead;
60
extern unsigned char UIMgr_rxFifoHead;
61
extern unsigned char UIMgr_rxFifoTail;
61
extern unsigned char UIMgr_rxFifoTail;
62
 
62
 
63
/* External Function Declaration */
63
/* External Function Declaration */
64
extern void UIMgr_init(void);
64
extern void UIMgr_init(void);
65
extern void UIMgr_writeBufferToTxFifo(unsigned char *pData, unsigned char length);
65
extern void UIMgr_writeBufferToTxFifo(unsigned char *pData, unsigned char length);
66
extern void UIMgr_txBuffer(unsigned char *pData, unsigned char length);
66
extern void UIMgr_txBuffer(unsigned char *pData, unsigned char length);
67
extern void UIMgr_processReceivedData(void);
67
extern void UIMgr_processReceivedData(void);
68
extern void UIMgr_transmitPendingData(void);
68
extern void UIMgr_transmitPendingData(void);
69
extern void UIMgr_dispatchEvent(unsigned char event);
69
extern void UIMgr_dispatchEvent(unsigned char event);
70
extern void UIMgr_flushTxBuffer(void);
70
extern void UIMgr_flushTxBuffer(void);
71
extern void UIMgr_writeTxFifo(unsigned char data);
71
extern void UIMgr_writeTxFifo(unsigned char data);
72
	
72
	
73
#endif	
73
#endif	
74
 
74