TTK4155 Ping-pong project
state_machine.c File Reference
#include "general_header.h"
#include "oled_driver.h"
#include "joystick_driver.h"
#include "slider_driver.h"
#include "button_driver.h"
#include "state_machine.h"
#include "eeprom.h"
#include "play_game.h"
Include dependency graph for state_machine.c:

Functions

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 main_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 navigate_menu (int number_of_menu_items, int first_menu_line, int line_selected, struct joystick_calibration_data_t *joystick_cal_data_p)
 
void set_brightness_state (struct joystick_calibration_data_t *joystick_cal_data_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 this_score)
 

Variables

int menu_item_offset = 20
 

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  this_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_p)
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:

Variable Documentation

◆ menu_item_offset

int menu_item_offset = 20