summaryrefslogtreecommitdiffstats
path: root/watch-library/shared
diff options
context:
space:
mode:
authorjoeycastillo <joeycastillo@utexas.edu>2022-01-27 14:33:45 -0500
committerGitHub <noreply@github.com>2022-01-27 14:33:45 -0500
commit932e10529d84872a0df6d182c721614dbf7ff8d2 (patch)
tree55a4ee8f21738ae09cc27cb58757a3c5d0567851 /watch-library/shared
parent5fb8dabdd2b557450886fa447c081209b2a3b74d (diff)
parenta4cb3c8594729224003e32fb1ea11307caa832d2 (diff)
downloadSensor-Watch-932e10529d84872a0df6d182c721614dbf7ff8d2.tar.gz
Sensor-Watch-932e10529d84872a0df6d182c721614dbf7ff8d2.tar.bz2
Sensor-Watch-932e10529d84872a0df6d182c721614dbf7ff8d2.zip
Merge pull request #43 from a2/rtc-disable-matching-mask
Add new function to disable certain RTC periodic callbacks
Diffstat (limited to 'watch-library/shared')
-rw-r--r--watch-library/shared/watch/watch_rtc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/watch-library/shared/watch/watch_rtc.h b/watch-library/shared/watch/watch_rtc.h
index 6dac63f5..183e6dd0 100644
--- a/watch-library/shared/watch/watch_rtc.h
+++ b/watch-library/shared/watch/watch_rtc.h
@@ -137,6 +137,12 @@ void watch_rtc_register_periodic_callback(ext_irq_cb_t callback, uint8_t frequen
*/
void watch_rtc_disable_periodic_callback(uint8_t frequency);
+/** @brief Disables tick callbacks for the given periods (as a bitmask).
+ * @param mask The frequencies of tick callbacks you wish to disable, in Hz.
+ * The 128 Hz callback is 0b1, the 64 Hz callback is 0b10, the 32 Hz callback is 0b100, etc.
+ */
+void watch_rtc_disable_matching_periodic_callbacks(uint8_t mask);
+
/** @brief Disables all periodic callbacks, including the once-per-second tick callback.
*/
void watch_rtc_disable_all_periodic_callbacks(void);