diff options
author | Alexsander Akers <me@a2.io> | 2022-01-27 11:23:14 -0500 |
---|---|---|
committer | Alexsander Akers <me@a2.io> | 2022-01-27 12:06:06 -0500 |
commit | a559d089f1845fb23434739f66b7bb5288191139 (patch) | |
tree | 7c1f628826078f2c604c86d4917ab36153917be3 /movement | |
parent | d3e484dc989a6e3a040b5b1092340973d9b4e22f (diff) | |
download | Sensor-Watch-a559d089f1845fb23434739f66b7bb5288191139.tar.gz Sensor-Watch-a559d089f1845fb23434739f66b7bb5288191139.tar.bz2 Sensor-Watch-a559d089f1845fb23434739f66b7bb5288191139.zip |
Add new function to disable certain RTC periodic callbacks
Diffstat (limited to 'movement')
-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..1c8e641c 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(0b01111111); movement_state.subsecond = 0; movement_state.tick_frequency = freq; |