summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/c/fastforge.h21
-rw-r--r--src/c/fastforge_types.h26
2 files changed, 28 insertions, 19 deletions
diff --git a/src/c/fastforge.h b/src/c/fastforge.h
index c7b370d..6c24e75 100644
--- a/src/c/fastforge.h
+++ b/src/c/fastforge.h
@@ -1,26 +1,9 @@
#ifndef FASTFORGE_H
#define FASTFORGE_H
-#include <pebble.h>
-
-/* Persisted fast record shared by the running state and history list. */
-typedef struct {
- time_t start_time;
- time_t end_time; // 0 = currently running
- uint16_t target_minutes;
- char note[32];
- uint8_t max_stage_reached; // 0=none, 1=12h, 2=18h, 3=24h+
-} FastEntry;
+#include "fastforge_types.h"
-/* Derived streak counters rebuilt from completed fast end dates. */
-typedef struct {
- uint16_t current_streak;
- uint16_t longest_streak;
- time_t last_completed_fast_end;
-} StreakData;
-
-#define MAX_FASTS 64
-#define DEFAULT_TARGET_MINUTES (16 * 60)
+#include <pebble.h>
#define KEY_HISTORY_COUNT 1
#define KEY_HISTORY_DATA 2
diff --git a/src/c/fastforge_types.h b/src/c/fastforge_types.h
new file mode 100644
index 0000000..e31dd96
--- /dev/null
+++ b/src/c/fastforge_types.h
@@ -0,0 +1,26 @@
+#ifndef FASTFORGE_TYPES_H
+#define FASTFORGE_TYPES_H
+
+#include <stdint.h>
+#include <time.h>
+
+/* Persisted fast record shared by the running state and history list. */
+typedef struct {
+ time_t start_time;
+ time_t end_time; // 0 = currently running
+ uint16_t target_minutes;
+ char note[32];
+ uint8_t max_stage_reached; // 0=none, 1=12h, 2=18h, 3=24h+
+} FastEntry;
+
+/* Derived streak counters rebuilt from completed fast end dates. */
+typedef struct {
+ uint16_t current_streak;
+ uint16_t longest_streak;
+ time_t last_completed_fast_end;
+} StreakData;
+
+#define MAX_FASTS 64
+#define DEFAULT_TARGET_MINUTES (16 * 60)
+
+#endif