diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2021-12-05 23:49:26 -0600 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2021-12-10 12:00:26 -0500 |
commit | 762af872d2f2c977e51d6e51b8c3ad622485cc05 (patch) | |
tree | 0fd44fe4996b04a82c5c0cc46178b5893d3ae1c0 /movement/watch_faces | |
parent | 316e1f292c603885f2af3dcd69ce797d64776425 (diff) | |
download | Sensor-Watch-762af872d2f2c977e51d6e51b8c3ad622485cc05.tar.gz Sensor-Watch-762af872d2f2c977e51d6e51b8c3ad622485cc05.tar.bz2 Sensor-Watch-762af872d2f2c977e51d6e51b8c3ad622485cc05.zip |
fix missing prototype warnings
Diffstat (limited to 'movement/watch_faces')
8 files changed, 17 insertions, 17 deletions
diff --git a/movement/watch_faces/clock/world_clock_face.c b/movement/watch_faces/clock/world_clock_face.c index d80cb5bc..e1d96c97 100644 --- a/movement/watch_faces/clock/world_clock_face.c +++ b/movement/watch_faces/clock/world_clock_face.c @@ -26,7 +26,7 @@ void world_clock_face_activate(movement_settings_t *settings, void *context) { watch_set_colon(); } -bool world_clock_face_do_display_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) { +static bool world_clock_face_do_display_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) { char buf[11]; uint8_t pos; @@ -101,7 +101,7 @@ bool world_clock_face_do_display_mode(movement_event_t event, movement_settings_ return true; } -bool world_clock_face_do_settings_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) { +static bool _world_clock_face_do_settings_mode(movement_event_t event, movement_settings_t *settings, world_clock_state_t *state) { switch (event.event_type) { case EVENT_MODE_BUTTON_UP: movement_move_to_next_face(); @@ -176,7 +176,7 @@ bool world_clock_face_loop(movement_event_t event, movement_settings_t *settings if (state->current_screen == 0) { return world_clock_face_do_display_mode(event, settings, state); } else { - return world_clock_face_do_settings_mode(event, settings, state); + return _world_clock_face_do_settings_mode(event, settings, state); } } diff --git a/movement/watch_faces/complications/day_one_face.c b/movement/watch_faces/complications/day_one_face.c index 146f3f6f..3b185d04 100644 --- a/movement/watch_faces/complications/day_one_face.c +++ b/movement/watch_faces/complications/day_one_face.c @@ -3,12 +3,12 @@ #include "day_one_face.h" #include "watch.h" -uint32_t _day_one_face_juliandaynum(uint16_t year, uint16_t month, uint16_t day) { +static uint32_t _day_one_face_juliandaynum(uint16_t year, uint16_t month, uint16_t day) { // from here: https://en.wikipedia.org/wiki/Julian_day#Julian_day_number_calculation return (1461 * (year + 4800 + (month - 14) / 12)) / 4 + (367 * (month - 2 - 12 * ((month - 14) / 12))) / 12 - (3 * ((year + 4900 + (month - 14) / 12) / 100))/4 + day - 32075; } -void _day_one_face_update(day_one_state_t state) { +static void _day_one_face_update(day_one_state_t state) { char buf[14]; watch_date_time date_time = watch_rtc_get_date_time(); uint32_t julian_date = _day_one_face_juliandaynum(date_time.unit.year + WATCH_RTC_REFERENCE_YEAR, date_time.unit.month, date_time.unit.day); diff --git a/movement/watch_faces/demos/lis2dh_logging_face.c b/movement/watch_faces/demos/lis2dh_logging_face.c index af82a004..9f5783fe 100644 --- a/movement/watch_faces/demos/lis2dh_logging_face.c +++ b/movement/watch_faces/demos/lis2dh_logging_face.c @@ -12,7 +12,7 @@ // Pressing the alarm button enters the log mode, where the main display shows the number of interrupts detected in each of the last // 24 hours (the hour is shown in the top right digit and AM/PM indicator, if the clock is set to 12 hour mode) -void _lis2dh_logging_face_update_display(movement_settings_t *settings, lis2dh_logger_state_t *logger_state, lis2dh_interrupt_state interrupt_state, watch_date_time date_time) { +static void _lis2dh_logging_face_update_display(movement_settings_t *settings, lis2dh_logger_state_t *logger_state, lis2dh_interrupt_state interrupt_state, watch_date_time date_time) { char buf[14]; char time_indication_character; int8_t pos; @@ -66,7 +66,7 @@ void _lis2dh_logging_face_update_display(movement_settings_t *settings, lis2dh_l watch_display_string(buf, 0); } -void _lis2dh_logging_face_log_data(lis2dh_logger_state_t *logger_state) { +static void _lis2dh_logging_face_log_data(lis2dh_logger_state_t *logger_state) { watch_date_time date_time = watch_rtc_get_date_time(); // we get this call 15 minutes late; i.e. at 6:15 we're logging events for 6:00. // so: if we're at the top of the hour, roll the hour back too (7:00 task logs data for 6:45) diff --git a/movement/watch_faces/demos/voltage_face.c b/movement/watch_faces/demos/voltage_face.c index bdc25679..fe43343f 100644 --- a/movement/watch_faces/demos/voltage_face.c +++ b/movement/watch_faces/demos/voltage_face.c @@ -3,7 +3,7 @@ #include "voltage_face.h" #include "watch.h" -void _voltage_face_update_display() { +static void _voltage_face_update_display(void) { char buf[14]; float voltage = (float)watch_get_vcc_voltage() / 1000.0; sprintf(buf, "BA %4.2f V", voltage); diff --git a/movement/watch_faces/thermistor/thermistor_driver.c b/movement/watch_faces/thermistor/thermistor_driver.c index 37b5ba3f..5659c281 100644 --- a/movement/watch_faces/thermistor/thermistor_driver.c +++ b/movement/watch_faces/thermistor/thermistor_driver.c @@ -2,7 +2,7 @@ #include "watch.h" #include "watch_utility.h" -void thermistor_driver_enable() { +void thermistor_driver_enable(void) { // Enable the ADC peripheral, which we'll use to read the thermistor value. watch_enable_adc(); // Enable analog circuitry on the sense pin, which is tied to the thermistor resistor divider. @@ -13,7 +13,7 @@ void thermistor_driver_enable() { watch_set_pin_level(THERMISTOR_ENABLE_PIN, !THERMISTOR_ENABLE_VALUE); } -void thermistor_driver_disable() { +void thermistor_driver_disable(void) { // Disable the ADC peripheral. watch_disable_adc(); // Disable analog circuitry on the sense pin to save power. @@ -22,7 +22,7 @@ void thermistor_driver_disable() { watch_disable_digital_output(THERMISTOR_ENABLE_PIN); } -float thermistor_driver_get_temperature() { +float thermistor_driver_get_temperature(void) { // set the enable pin to the level that powers the thermistor circuit. watch_set_pin_level(THERMISTOR_ENABLE_PIN, THERMISTOR_ENABLE_VALUE); // get the sense pin level diff --git a/movement/watch_faces/thermistor/thermistor_driver.h b/movement/watch_faces/thermistor/thermistor_driver.h index a0b197de..425e1154 100644 --- a/movement/watch_faces/thermistor/thermistor_driver.h +++ b/movement/watch_faces/thermistor/thermistor_driver.h @@ -12,8 +12,8 @@ #define THERMISTOR_NOMINAL_RESISTANCE (10000.0) #define THERMISTOR_SERIES_RESISTANCE (10000.0) -void thermistor_driver_enable(); -void thermistor_driver_disable(); -float thermistor_driver_get_temperature(); +void thermistor_driver_enable(void); +void thermistor_driver_disable(void); +float thermistor_driver_get_temperature(void); #endif // THERMISTOR_DRIVER_H_ diff --git a/movement/watch_faces/thermistor/thermistor_logging_face.c b/movement/watch_faces/thermistor/thermistor_logging_face.c index 3e9e62b3..0d456785 100644 --- a/movement/watch_faces/thermistor/thermistor_logging_face.c +++ b/movement/watch_faces/thermistor/thermistor_logging_face.c @@ -4,7 +4,7 @@ #include "thermistor_driver.h" #include "watch.h" -void _thermistor_logging_face_log_data(thermistor_logger_state_t *logger_state) { +static void _thermistor_logging_face_log_data(thermistor_logger_state_t *logger_state) { thermistor_driver_enable(); watch_date_time date_time = watch_rtc_get_date_time(); size_t pos = logger_state->data_points % THERMISTOR_LOGGING_NUM_DATA_POINTS; @@ -16,7 +16,7 @@ void _thermistor_logging_face_log_data(thermistor_logger_state_t *logger_state) thermistor_driver_disable(); } -void _thermistor_logging_face_update_display(thermistor_logger_state_t *logger_state, bool in_fahrenheit, bool clock_mode_24h) { +static void _thermistor_logging_face_update_display(thermistor_logger_state_t *logger_state, bool in_fahrenheit, bool clock_mode_24h) { int8_t pos = (logger_state->data_points - 1 - logger_state->display_index) % THERMISTOR_LOGGING_NUM_DATA_POINTS; char buf[14]; diff --git a/movement/watch_faces/thermistor/thermistor_readout_face.c b/movement/watch_faces/thermistor/thermistor_readout_face.c index 8c5645e2..5478f07d 100644 --- a/movement/watch_faces/thermistor/thermistor_readout_face.c +++ b/movement/watch_faces/thermistor/thermistor_readout_face.c @@ -4,7 +4,7 @@ #include "thermistor_driver.h" #include "watch.h" -void _thermistor_readout_face_update_display(bool in_fahrenheit) { +static void _thermistor_readout_face_update_display(bool in_fahrenheit) { thermistor_driver_enable(); float temperature_c = thermistor_driver_get_temperature(); char buf[14]; |