Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
swadge2024.c File Reference

Macros

#define RTC_DATA_ATTR
 

Functions

void app_main (void)
 
void deinitSystem (void)
 Deinitialize all components in the system.
 
void switchToSwadgeMode (swadgeMode_t *mode)
 
void softSwitchToPendingSwadge (void)
 Switch to the pending Swadge mode without restarting the system.
 
bool checkButtonQueueWrapper (buttonEvt_t *evt)
 Service the queue of button events that caused interrupts This only returns a single event, even if there are multiple in the queue This function may be called multiple times in a row to completely empty the queue.
 
void openQuickSettings (void)
 
void setFrameRateUs (uint32_t newFrameRateUs)
 Set the framerate, in microseconds.
 
uint32_t getFrameRateUs (void)
 Get the current framerate, in microseconds.
 

Macro Definition Documentation

◆ RTC_DATA_ATTR

#define RTC_DATA_ATTR

Function Documentation

◆ app_main()

void app_main ( void )

The main entry point for firmware. This initializes the system and runs the main loop

◆ deinitSystem()

void deinitSystem ( void )

Deinitialize all components in the system.

◆ switchToSwadgeMode()

void switchToSwadgeMode ( swadgeMode_t * mode)

Set up variables to synchronously switch the swadge mode in the main loop

Parameters
modeA pointer to the mode to switch to

◆ softSwitchToPendingSwadge()

void softSwitchToPendingSwadge ( void )

Switch to the pending Swadge mode without restarting the system.

◆ checkButtonQueueWrapper()

bool checkButtonQueueWrapper ( buttonEvt_t * evt)

Service the queue of button events that caused interrupts This only returns a single event, even if there are multiple in the queue This function may be called multiple times in a row to completely empty the queue.

This is a wrapper for checkButtonQueue() which also monitors the button to return to the main menu

Parameters
evtIf an event occurred, return it through this argument
Returns
true if an event occurred, false if nothing happened

◆ openQuickSettings()

void openQuickSettings ( void )

◆ setFrameRateUs()

void setFrameRateUs ( uint32_t newFrameRateUs)

Set the framerate, in microseconds.

Parameters
newFrameRateUsThe time between frame draws, in microseconds

◆ getFrameRateUs()

uint32_t getFrameRateUs ( void )

Get the current framerate, in microseconds.

Returns
uint32_t The time between frame draws, in microseconds