rename types to be more c-like
This commit is contained in:
@@ -6,17 +6,17 @@
|
||||
#define PULSOMETER_FACE_FREQUENCY_FACTOR (4ul) // refresh rate will be 2 to this power Hz (0 for 1 Hz, 2 for 4 Hz, etc.)
|
||||
#define PULSOMETER_FACE_FREQUENCY (1 << PULSOMETER_FACE_FREQUENCY_FACTOR)
|
||||
|
||||
void pulseometer_face_setup(LauncherSettings *settings, void ** context_ptr) {
|
||||
void pulseometer_face_setup(movement_settings_t *settings, void ** context_ptr) {
|
||||
(void) settings;
|
||||
if (*context_ptr == NULL) *context_ptr = malloc(sizeof(PulsometerState));
|
||||
}
|
||||
|
||||
void pulseometer_face_activate(LauncherSettings *settings, void *context) {
|
||||
void pulseometer_face_activate(movement_settings_t *settings, void *context) {
|
||||
(void) settings;
|
||||
memset(context, 0, sizeof(PulsometerState));
|
||||
}
|
||||
|
||||
bool pulseometer_face_loop(LauncherEvent event, LauncherSettings *settings, void *context) {
|
||||
bool pulseometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context) {
|
||||
printf("pulseometer_face_loop\n");
|
||||
(void) settings;
|
||||
PulsometerState *pulsometer_state = (PulsometerState *)context;
|
||||
@@ -81,7 +81,7 @@ bool pulseometer_face_loop(LauncherEvent event, LauncherSettings *settings, void
|
||||
return true;
|
||||
}
|
||||
|
||||
void pulseometer_face_resign(LauncherSettings *settings, void *context) {
|
||||
void pulseometer_face_resign(movement_settings_t *settings, void *context) {
|
||||
(void) settings;
|
||||
(void) context;
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ typedef struct {
|
||||
int16_t ticks;
|
||||
} PulsometerState;
|
||||
|
||||
void pulseometer_face_setup(LauncherSettings *settings, void ** context_ptr);
|
||||
void pulseometer_face_activate(LauncherSettings *settings, void *context);
|
||||
bool pulseometer_face_loop(LauncherEvent event, LauncherSettings *settings, void *context);
|
||||
void pulseometer_face_resign(LauncherSettings *settings, void *context);
|
||||
void pulseometer_face_setup(movement_settings_t *settings, void ** context_ptr);
|
||||
void pulseometer_face_activate(movement_settings_t *settings, void *context);
|
||||
bool pulseometer_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
|
||||
void pulseometer_face_resign(movement_settings_t *settings, void *context);
|
||||
|
||||
#define pulseometer_face { \
|
||||
pulseometer_face_setup, \
|
||||
|
||||
Reference in New Issue
Block a user