All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
robotc_glue.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: robotc_glue.h */
10 /* Author: James Pearman */
11 /* Created: 5 June 2013 */
12 /* */
13 /* V1.00 4 July 2013 - Initial release */
14 /* */
15 /*-----------------------------------------------------------------------------*/
16 /* */
17 /* This file is part of ConVEX. */
18 /* */
19 /* The author is supplying this software for use with the VEX cortex */
20 /* control system. ConVEX is free software; you can redistribute it */
21 /* and/or modify it under the terms of the GNU General Public License */
22 /* as published by the Free Software Foundation; either version 3 of */
23 /* the License, or (at your option) any later version. */
24 /* */
25 /* ConVEX is distributed in the hope that it will be useful, */
26 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
27 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
28 /* GNU General Public License for more details. */
29 /* */
30 /* You should have received a copy of the GNU General Public License */
31 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
32 /* */
33 /* A special exception to the GPL can be applied should you wish to */
34 /* distribute a combined work that includes ConVEX, without being obliged */
35 /* to provide the source code for any proprietary components. */
36 /* See the file exception.txt for full details of how and when the */
37 /* exception can be applied. */
38 /* */
39 /* The author can be contacted on the vex forums as jpearman */
40 /* or electronic mail using jbpearman_at_mac_dot_com */
41 /* Mentor for team 8888 RoboLancers, Pasadena CA. */
42 /* */
43 /*-----------------------------------------------------------------------------*/
44 /* */
45 
46 #ifndef __RCGLUE__
47 #define __RCGLUE__
48 
49 
50 /*-----------------------------------------------------------------------------*/
51 /** @file robotc_glue.h
52  * @brief Header for ROBOTC glue functions
53 *//*---------------------------------------------------------------------------*/
54 
55 /** @brief ROBOTC "tasks" return type task
56  */
57 typedef msg_t task;
58 
59 /** @brief Macro to simulate the ROBOTC StartTask function
60  */
61 #define StartTask(pf, ... ) StartTaskWithPriority( pf, ##__VA_ARGS__, NORMALPRIO )
62 
63 /** @brief delay compatibility shortcut
64  */
65 #define wait1Msec(ms) vexSleep(ms)
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 Thread *StartTaskWithPriority(tfunc_t pf, tprio_t priority, ... );
72 void StopTask(tfunc_t pf);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif // __RCGLUE__