diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-10-06 10:25:28 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-10-06 11:17:16 -0400 |
commit | 3516f4295eafbb04f7ccd1f4947c4921fae6e9bf (patch) | |
tree | cf70627d085cf3a6a9b51330ec82b7543f1e029f /launcher/launcher.h | |
parent | 12ee9221354c863bddb21a076dd3e3bdface3c67 (diff) | |
download | Sensor-Watch-3516f4295eafbb04f7ccd1f4947c4921fae6e9bf.tar.gz Sensor-Watch-3516f4295eafbb04f7ccd1f4947c4921fae6e9bf.tar.bz2 Sensor-Watch-3516f4295eafbb04f7ccd1f4947c4921fae6e9bf.zip |
launcher: clean up structs
Diffstat (limited to 'launcher/launcher.h')
-rw-r--r-- | launcher/launcher.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/launcher/launcher.h b/launcher/launcher.h index 97c56545..5c5315a3 100644 --- a/launcher/launcher.h +++ b/launcher/launcher.h @@ -37,29 +37,24 @@ typedef enum { EVENT_ALARM_LONG_PRESS, // The alarm button was held for >2 seconds, and released. } LauncherEventType; -typedef union { - struct { - uint32_t event_type : 8; - uint32_t subsecond : 8; - uint32_t reserved : 16; - } bit; - uint32_t value; +typedef struct { + uint8_t event_type; + uint8_t subsecond; } LauncherEvent; - typedef void (*launcher_widget_setup)(LauncherSettings *settings, void ** context_ptr); typedef void (*launcher_widget_activate)(LauncherSettings *settings, void *context); typedef bool (*launcher_widget_loop)(LauncherEvent event, LauncherSettings *settings, void *context); typedef void (*launcher_widget_resign)(LauncherSettings *settings, void *context); -typedef struct WatchWidget { +typedef struct { launcher_widget_setup setup; launcher_widget_activate activate; launcher_widget_loop loop; launcher_widget_resign resign; } WatchWidget; -typedef struct LauncherState { +typedef struct { // properties stored in BACKUP register LauncherSettings launcher_settings; |