fix missing prototype warnings
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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_
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user