ECE4760 - Laser Projector (ipb7, jcc384, pfc38)  1
Raster Laser Projection
joystick.h
Go to the documentation of this file.
1 
8 #ifndef JOYSTICK_H
9 #define JOYSTICK_H
10 
11 /*******************************/
12 /* Includes */
13 /*******************************/
15 
16 #include "include.h"
17 #include "parameters.h"
18 
20 
21 /*******************************/
22 /* GLOBAL Macro Definitions */
23 /*******************************/
25 
27 
28 /*********************************/
29 /* GLOBAL Type(def) Declarations */
30 /*********************************/
32 
40 struct joystick_vect {
41  int16_t x;
42  int16_t y;
43 };
44 
46 
47 /********************************/
48 /* GLOBAL Variable Declarations */
49 /********************************/
51 
53 
54 /********************************/
55 /* GLOBAL Function Declarations */
56 /********************************/
58 
62 void joystick_init(void);
63 
71 struct joystick_vect joystick_get_pos(void);
72 
79 inline bool joystick_pushed(void);
80 
82 
83 #endif // JOYSTICK_H
84 
int16_t y
Definition: joystick.h:42
bool joystick_pushed(void)
Whether the joystick button is pressed.
Definition: joystick.c:148
int16_t x
Definition: joystick.h:41
struct joystick_vect joystick_get_pos(void)
Get most recent recorded joystick direction.
Definition: joystick.c:111
Compile-time parameters to control system.
vector representing the joystick state.
Definition: joystick.h:40
void joystick_init(void)
Initialize joystick state and peripherals.
Definition: joystick.c:53