int menu_init(struct menu_cfg *menu)
Initializes menu and OLED display.
int cursor_update(struct menu_cfg *menu, struct io_avr_buttons *btn)
Updates the cursor position based on nav button from the IO board. Wraps around if going out of bound...
int menu_handler(struct menu_cfg *menu, struct io_avr_buttons *btn)
Handles menu logic (navigation, selection, page timers).
int draw_cursor(struct menu_cfg *menu)
Draws the cursor (">") at the current cursor position in the menu.
int high_scores_display(struct menu_cfg *menu)
Displays the high scores page.
int welcome_display(struct menu_cfg *menu)
Displays the welcome page.
int game_over_display(struct menu_cfg *menu)
page_id
Menu page identifiers.
int set_page(struct menu_cfg *menu, enum page_id page)
Sets the current page field in the menu struct to a specified page and calls the page_dispatch functi...
int page_back(struct menu_cfg *menu, struct io_avr_buttons *btn)
int play_game_display(struct menu_cfg *menu)
Displays the play game page.
int brightness_display(struct menu_cfg *menu)
int page_select(struct menu_cfg *menu, struct io_avr_buttons *btn)
Selects the current menu item based on nav button from the IO board.
int page_dispatch(struct menu_cfg *menu)
Dispatches to the current page display function.
int calibrate_joystick_display(struct menu_cfg *menu)
int settings_display(struct menu_cfg *menu)
Displays the settings page.
@ PAGE_CALIBRATE_JOYSTICK
Driver for joystick, buttons, and OLED.
struct io_avr_buttons btn
Represents an OLED display device controlled via SPI.