summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/complication/stopwatch_face.h
blob: c6e3aadb5b19f375d99b0b0a634f20a84809a868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef STOPWATCH_FACE_H_
#define STOPWATCH_FACE_H_

#include "movement.h"

typedef struct {
    bool running;
    uint8_t seconds;
    uint8_t minutes;
    uint8_t hours;
} stopwatch_state_t;

void stopwatch_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
void stopwatch_face_activate(movement_settings_t *settings, void *context);
bool stopwatch_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void stopwatch_face_resign(movement_settings_t *settings, void *context);

#define stopwatch_face ((const watch_face_t){ \
    stopwatch_face_setup, \
    stopwatch_face_activate, \
    stopwatch_face_loop, \
    stopwatch_face_resign, \
    NULL, \
})

#endif // STOPWATCH_FACE_H_