TTK4155 Ping-pong project
state_machine.h
Go to the documentation of this file.
1 
2 
3 #ifndef STATE_MACHINE_H_
4 #define STATE_MACHINE_H_
5 
6 #define NAME_SIZE 4
7 
8 typedef enum {
17 } state_t;
18 
19 
20 
21 typedef struct highscore_entry_t {
22 
23  char name[NAME_SIZE];
24  int score;
25 
26  } ;
27 
28 
29 int navigate_menu(int number_of_menu_items, int first_menu_line, int line_selected, struct joystick_calibration_data_t *joystick_cal_data_p);
30 
31 int main_menu(struct joystick_calibration_data_t *joystick_cal_data);
32 int event_handler(struct joystick_calibration_data_t *joystick_cal_data_p, struct slider_calibration_data_t *slider_cal_data_p);
33 int settings_menu(struct joystick_calibration_data_t *joystick_cal_data_p);
34 int calibrate_menu(struct joystick_calibration_data_t *joystick_cal_data_p);
35 int game_menu(struct joystick_calibration_data_t *joystick_cal_data_p, struct slider_calibration_data_t *slider_cal_data_p, struct highscore_entry_t *highscore_list_p);
36 
37 int highscore_menu(struct joystick_calibration_data_t *joystick_cal_data_p, struct highscore_entry_t *highscore_list_p);
38 int insert_highscore(struct highscore_entry_t *highscore_list_p, uint16_t score);
39 
40 void set_brightness_state(struct joystick_calibration_data_t *joystick_cal_data_p);
41 
42 #endif /* STATE_MACHINE_H_ */
void set_brightness_state(struct joystick_calibration_data_t *joystick_cal_data_p)
Definition: state_machine.c:298
int main_menu(struct joystick_calibration_data_t *joystick_cal_data)
Definition: state_machine.c:174
int navigate_menu(int number_of_menu_items, int first_menu_line, int line_selected, struct joystick_calibration_data_t *joystick_cal_data_p)
Definition: state_machine.c:255
int event_handler(struct joystick_calibration_data_t *joystick_cal_data_p, struct slider_calibration_data_t *slider_cal_data_p)
Definition: state_machine.c:13
int game_menu(struct joystick_calibration_data_t *joystick_cal_data_p, struct slider_calibration_data_t *slider_cal_data_p, struct highscore_entry_t *highscore_list_p)
Definition: state_machine.c:216
#define NAME_SIZE
Definition: state_machine.h:6
Definition: state_machine.h:15
Definition: state_machine.h:9
int score
Definition: state_machine.h:24
Definition: state_machine.h:10
Definition: state_machine.h:21
Definition: slider_driver.h:7
Definition: state_machine.h:12
int insert_highscore(struct highscore_entry_t *highscore_list_p, uint16_t score)
Definition: state_machine.c:432
Definition: state_machine.h:16
Definition: joystick_driver.h:9
int highscore_menu(struct joystick_calibration_data_t *joystick_cal_data_p, struct highscore_entry_t *highscore_list_p)
Definition: state_machine.c:397
int settings_menu(struct joystick_calibration_data_t *joystick_cal_data_p)
Definition: state_machine.c:84
int calibrate_menu(struct joystick_calibration_data_t *joystick_cal_data_p)
Definition: state_machine.c:129
Definition: state_machine.h:13
Definition: state_machine.h:11
Definition: state_machine.h:14
state_t
Definition: state_machine.h:8
char name[NAME_SIZE]
Definition: state_machine.h:23