#ifndef _OSWALD_H #define _OSWALD_H typedef signed char s8t; typedef unsigned char u8t; typedef signed short s16t; typedef unsigned short u16t; typedef u8t boolean; #ifdef TRUE #undef TRUE #endif #define TRUE 1 #ifdef FALSE #undef FALSE #endif #define FALSE 0 #ifndef NULL #define NULL 0 #endif typedef struct { u8t hour; u8t minute; u8t second; u8t day; u8t month; u8t year; } clock_state; typedef enum { IDLE_SCREEN = 0, SETTING_DATETIME_SCREEN, // SCREEN2_SCREEN, // SCREEN3_SCREEN, // APPLICATION_SCREEN, LAST_SCREEN, // a marker for the last (not valid) screen) } screen_number; typedef enum { BUTTON_A = 0, BUTTON_B, BUTTON_C, BUTTON_D, BUTTON_E, BUTTON_F, } watch_button; typedef struct { void (*button_func)(watch_button button); } watch_screen; typedef struct { screen_number screen; // void (*draw_watchface_func)(boolean show_seconds); boolean idle_show_seconds; void (*user_button_func)(watch_button button); void (*user_screendraw_func)(void); } watch_state; #endif