fix missing prototype warnings

This commit is contained in:
Joey Castillo
2021-12-05 23:49:26 -06:00
parent 316e1f292c
commit 762af872d2
46 changed files with 242 additions and 234 deletions

View File

@@ -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

View File

@@ -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_

View File

@@ -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];

View File

@@ -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];