-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_routines.h
executable file
·80 lines (67 loc) · 3.1 KB
/
user_routines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*******************************************************************************
* FILE NAME: user_routines.h
*
* DESCRIPTION:
* This is the include file which corresponds to user_routines.c and
* user_routines_fast.c
* It contains some aliases and function prototypes used in those files.
*
* USAGE:
* If you add your own routines to those files, this is a good place to add
* your custom macros (aliases), type definitions, and function prototypes.
*******************************************************************************/
#ifndef __user_program_h_
#define __user_program_h_
/*******************************************************************************
MACRO DECLARATIONS
*******************************************************************************/
/* Add your macros (aliases and constants) here. */
/* Do not edit the ones in ifi_aliases.h */
/* Macros are substituted in at compile time and make your code more readable */
/* as well as making it easy to change a constant value in one place, rather */
/* than at every place it is used in your code. */
/*
EXAMPLE CONSTANTS:
#define MAXIMUM_LOOPS 5
#define THE_ANSWER 42
#define TRUE 1
#define FALSE 0
#define PI_VAL 3.1415
EXAMPLE ALIASES:
#define LIMIT_SWITCH_1 rc_dig_int1 (Points to another macro in ifi_aliases.h)
#define MAIN_SOLENOID solenoid1 (Points to another macro in ifi_aliases.h)
*/
/* Used in limit switch routines in user_routines.c */
#define OPEN 1 /* Limit switch is open (input is floating high). */
#define CLOSED 0 /* Limit switch is closed (input connected to ground). */
/*******************************************************************************
TYPEDEF DECLARATIONS
*******************************************************************************/
/* EXAMPLE DATA STRUCTURE */
/*
typedef struct
{
unsigned int NEW_CAPTURE_DATA:1;
unsigned int LAST_IN1:1;
unsigned int LAST_IN2:1;
unsigned int WHEEL_COUNTER_UP:1;
unsigned int :4;
unsigned int wheel_left_counter;
unsigned int wheel_right_counter;
} user_struct;
*/
/*******************************************************************************
FUNCTION PROTOTYPES
*******************************************************************************/
/* These routines reside in user_routines.c */
void User_Initialization(void);
void Process_Data_From_Master_uP(void);
void Default_Routine(void);
/* These routines reside in user_routines_fast.c */
void InterruptHandlerLow (void); /* DO NOT CHANGE! */
void User_Autonomous_Code(void); /* Only in full-size FRC system. */
void Process_Data_From_Local_IO(void);
#endif
/******************************************************************************/
/******************************************************************************/
/******************************************************************************/