-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.h
More file actions
34 lines (27 loc) · 774 Bytes
/
controller.h
File metadata and controls
34 lines (27 loc) · 774 Bytes
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
/*
The Controller works as follows:
__
| | <-UP
-- __
| | <-RISE
__ __ --
| | <-LEFT | | <-RIGHT
-- --
| | <-FALL
__ --
| | <-DOWN
--
where UP, DOWN are changes in Y
LEFT, RIGHT are changes in X
and RISE, FALL are changes in Z
Note that DOWN causes Y to increase due
to the left handed coordinate system
*/
void init_controller(void);
int read_bit(int bit_num);
int up_pressed(void);
int down_pressed(void);
int left_pressed(void);
int right_pressed(void);
int rise_pressed(void);
int fall_pressed(void);