diff options
author | joeycastillo <joeycastillo@utexas.edu> | 2022-01-27 14:33:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 14:33:45 -0500 |
commit | 932e10529d84872a0df6d182c721614dbf7ff8d2 (patch) | |
tree | 55a4ee8f21738ae09cc27cb58757a3c5d0567851 /movement/movement.c | |
parent | 5fb8dabdd2b557450886fa447c081209b2a3b74d (diff) | |
parent | a4cb3c8594729224003e32fb1ea11307caa832d2 (diff) | |
download | Sensor-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 'movement/movement.c')
-rw-r--r-- | movement/movement.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/movement/movement.c b/movement/movement.c index d15c349f..aa95f2f1 100644 --- a/movement/movement.c +++ b/movement/movement.c @@ -155,13 +155,7 @@ void movement_request_tick_frequency(uint8_t freq) { if (freq == 128) return; // Movement uses the 128 Hz tick internally // disable all callbacks except the 128 Hz one -#if __EMSCRIPTEN__ - for (int i = 1; i < 128; i = i << 1) { - watch_rtc_disable_periodic_callback(i); - } -#else - RTC->MODE2.INTENCLR.reg = 0xFE; -#endif + watch_rtc_disable_matching_periodic_callbacks(0xFE); movement_state.subsecond = 0; movement_state.tick_frequency = freq; |