Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
apollo.h
Go to the documentation of this file.
1
/*-----------------------------------------------------------------------------*/
2
/* */
3
/* Copyright (c) James Pearman */
4
/* 2013 */
5
/* All Rights Reserved */
6
/* */
7
/*-----------------------------------------------------------------------------*/
8
/* */
9
/* Module: apollo.h */
10
/* Author: James Pearman */
11
/* Created: 5 June 2013 */
12
/* */
13
/* Revisions: */
14
/* V1.00 4 July 2013 - Initial release */
15
/* */
16
/*-----------------------------------------------------------------------------*/
17
/* */
18
/* This file is part of ConVEX. */
19
/* */
20
/* The author is supplying this software for use with the VEX cortex */
21
/* control system. ConVEX is free software; you can redistribute it */
22
/* and/or modify it under the terms of the GNU General Public License */
23
/* as published by the Free Software Foundation; either version 3 of */
24
/* the License, or (at your option) any later version. */
25
/* */
26
/* ConVEX is distributed in the hope that it will be useful, */
27
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
28
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
29
/* GNU General Public License for more details. */
30
/* */
31
/* You should have received a copy of the GNU General Public License */
32
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
33
/* */
34
/* A special exception to the GPL can be applied should you wish to */
35
/* distribute a combined work that includes ConVEX, without being obliged */
36
/* to provide the source code for any proprietary components. */
37
/* See the file exception.txt for full details of how and when the */
38
/* exception can be applied. */
39
/* */
40
/* The author can be contacted on the vex forums as jpearman */
41
/* or electronic mail using jbpearman_at_mac_dot_com */
42
/* Mentor for team 8888 RoboLancers, Pasadena CA. */
43
/* */
44
/*-----------------------------------------------------------------------------*/
45
46
#ifndef __APOLLO__
47
#define __APOLLO__
48
49
/*-----------------------------------------------------------------------------*/
50
/** @file apollo.h
51
* @brief Status display for VT100 console macros and prototypes
52
*/
/*---------------------------------------------------------------------------*/
53
54
55
/*-----------------------------------------------------------------------------*/
56
/** @name terminal origin and size
57
* @{
58
*/
/*---------------------------------------------------------------------------*/
59
#define T_X_ORIGIN 1
60
#define T_Y_ORIGIN 1
61
#define T_WIDTH 80
62
#define T_HEIGHT 24
63
/** @} */
64
65
/*-----------------------------------------------------------------------------*/
66
/** @name Motor status origin and size
67
* @{
68
*/
/*---------------------------------------------------------------------------*/
69
#define M_X_POS 1
70
#define M_WIDTH 41
71
#define M_Y_POS 1
72
#define M_HEIGHT 15
73
/** @} */
74
75
/*-----------------------------------------------------------------------------*/
76
/** @name Digital ports status origin and size
77
* @{
78
*/
/*---------------------------------------------------------------------------*/
79
#define D_X_POS (M_X_POS+M_WIDTH-1)
80
#define D_WIDTH 21
81
#define D_Y_POS 1
82
#define D_HEIGHT 15
83
/** @} */
84
85
/*-----------------------------------------------------------------------------*/
86
/** @name Analog ports status origin and size
87
* @{
88
*/
/*---------------------------------------------------------------------------*/
89
#define A_X_POS (D_X_POS+D_WIDTH-1)
90
#define A_WIDTH 20
91
#define A_Y_POS 1
92
#define A_HEIGHT 15
93
/** @} */
94
95
/*-----------------------------------------------------------------------------*/
96
/** @name Joystick status origin
97
* @{
98
*/
/*---------------------------------------------------------------------------*/
99
#define J_X_POS 1
100
#define J_Y_POS 15
101
/** @} */
102
103
#ifdef __cplusplus
104
extern
"C"
{
105
#endif
106
107
void
apolloScreenSetup
(
void
);
108
void
apolloMotorSetup
(
void
);
109
void
apolloDigitalSetup
(
void
);
110
void
apolloAnalogSetup
(
void
);
111
void
apolloJoystickSetup
(
int
joystick );
112
void
apolloInit
(
void
);
113
void
apolloDeinit
(
void
);
114
void
apolloUpdateMotor
(
int
m );
115
void
apolloUpdateCortex
(
int
p );
116
void
apolloUpdateDigital
(
int
pin );
117
void
apolloUpdateAnalog
(
int
pin );
118
void
apolloUpdateSystem
(
void
);
119
void
apolloUpdateJoystickButton
(
int
joystick,
int
row,
int
up,
int
down,
int
left,
int
right );
120
void
apolloUpdateJoystickAnalog
(
int
joystick,
int
row,
int
h,
int
v );
121
void
apolloUpdate
(
void
);
122
123
#ifdef __cplusplus
124
}
125
#endif
126
127
#endif // __APOLLO__
128
convex
cortex
opt
apollo.h
Generated on Sun Jan 5 2014 15:43:37 for Convex by
1.8.4