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 /watch-library/watch/watch_rtc.c | |
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 'watch-library/watch/watch_rtc.c')
-rw-r--r-- | watch-library/watch/watch_rtc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/watch-library/watch/watch_rtc.c b/watch-library/watch/watch_rtc.c index a50da7c4..14a968c4 100644 --- a/watch-library/watch/watch_rtc.c +++ b/watch-library/watch/watch_rtc.c @@ -30,15 +30,15 @@ ext_irq_cb_t btn_alarm_callback; ext_irq_cb_t a2_callback; ext_irq_cb_t a4_callback; -bool _watch_rtc_is_enabled() { +bool _watch_rtc_is_enabled(void) { return RTC->MODE2.CTRLA.bit.ENABLE; } -void _sync_rtc() { +static void _sync_rtc(void) { while (RTC->MODE2.SYNCBUSY.reg); } -void _watch_rtc_init() { +void _watch_rtc_init(void) { MCLK->APBAMASK.reg |= MCLK_APBAMASK_RTC; if (_watch_rtc_is_enabled()) return; // don't reset the RTC if it's already set up. @@ -61,7 +61,7 @@ void watch_rtc_set_date_time(watch_date_time date_time) { _sync_rtc(); } -watch_date_time watch_rtc_get_date_time() { +watch_date_time watch_rtc_get_date_time(void) { watch_date_time retval; _sync_rtc(); @@ -74,7 +74,7 @@ void watch_rtc_register_tick_callback(ext_irq_cb_t callback) { watch_rtc_register_periodic_callback(callback, 1); } -void watch_rtc_disable_tick_callback() { +void watch_rtc_disable_tick_callback(void) { watch_rtc_disable_periodic_callback(1); } @@ -102,7 +102,7 @@ void watch_rtc_disable_periodic_callback(uint8_t frequency) { RTC->MODE2.INTENCLR.reg = 1 << per_n; } -void watch_rtc_disable_all_periodic_callbacks() { +void watch_rtc_disable_all_periodic_callbacks(void) { RTC->MODE2.INTENCLR.reg = 0xFF; } @@ -116,7 +116,7 @@ void watch_rtc_register_alarm_callback(ext_irq_cb_t callback, watch_date_time al RTC->MODE2.INTENSET.reg = RTC_MODE2_INTENSET_ALARM0; } -void watch_rtc_disable_alarm_callback() { +void watch_rtc_disable_alarm_callback(void) { RTC->MODE2.INTENCLR.reg = RTC_MODE2_INTENCLR_ALARM0; } |