TTK4155 Ping-pong project
state_machine.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  highscore_entry_t
 

Macros

#define NAME_SIZE   4
 

Enumerations

enum  state_t {
  main_menu_state = 0, play_game_state, highscore_state, settings_state,
  calibrate_state, calibrate_j_state, calibrate_s_state, brightness_state
}
 

Functions

int navigate_menu (int number_of_menu_items, int first_menu_line, int line_selected, struct joystick_calibration_data_t *joystick_cal_data_p)
 
int main_menu (struct joystick_calibration_data_t *joystick_cal_data)
 
int event_handler (struct joystick_calibration_data_t *joystick_cal_data_p, struct slider_calibration_data_t *slider_cal_data_p)
 
int settings_menu (struct joystick_calibration_data_t *joystick_cal_data_p)
 
int calibrate_menu (struct joystick_calibration_data_t *joystick_cal_data_p)
 
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)
 
int highscore_menu (struct joystick_calibration_data_t *joystick_cal_data_p, struct highscore_entry_t *highscore_list_p)
 
int insert_highscore (struct highscore_entry_t *highscore_list_p, uint16_t score)
 
void set_brightness_state (struct joystick_calibration_data_t *joystick_cal_data_p)
 

Macro Definition Documentation

◆ NAME_SIZE

#define NAME_SIZE   4

Enumeration Type Documentation

◆ state_t

enum state_t
Enumerator
main_menu_state 
play_game_state 
highscore_state 
settings_state 
calibrate_state 
calibrate_j_state 
calibrate_s_state 
brightness_state 

Function Documentation

◆ calibrate_menu()

int calibrate_menu ( struct joystick_calibration_data_t joystick_cal_data_p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ event_handler()

int event_handler ( struct joystick_calibration_data_t joystick_cal_data_p,
struct slider_calibration_data_t slider_cal_data_p 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ game_menu()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ highscore_menu()

int highscore_menu ( struct joystick_calibration_data_t joystick_cal_data_p,
struct highscore_entry_t highscore_list_p 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert_highscore()

int insert_highscore ( struct highscore_entry_t highscore_list_p,
uint16_t  score 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main_menu()

int main_menu ( struct joystick_calibration_data_t joystick_cal_data)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ navigate_menu()

int navigate_menu ( int  number_of_menu_items,
int  first_menu_line,
int  line_selected,
struct joystick_calibration_data_t joystick_cal_data_p 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_brightness_state()

void set_brightness_state ( struct joystick_calibration_data_t joystick_cal_data_p)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ settings_menu()

int settings_menu ( struct joystick_calibration_data_t joystick_cal_data_p)
Here is the call graph for this function:
Here is the caller graph for this function: