summaryrefslogtreecommitdiffstats
path: root/movement
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-02-01 00:24:20 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-02-01 00:24:20 -0500
commita3085cb1364cba787ede58a35f3106108604b283 (patch)
tree7b43634949f56ff9fe55c7ce853cf47b9c2cf926 /movement
parent658739c880ca3568c7d3774d7c76fcdc3059a01b (diff)
parent932e10529d84872a0df6d182c721614dbf7ff8d2 (diff)
downloadSensor-Watch-a3085cb1364cba787ede58a35f3106108604b283.tar.gz
Sensor-Watch-a3085cb1364cba787ede58a35f3106108604b283.tar.bz2
Sensor-Watch-a3085cb1364cba787ede58a35f3106108604b283.zip
Merge branch 'main' of github.com:joeycastillo/Sensor-Watch
Diffstat (limited to 'movement')
-rw-r--r--movement/movement.c8
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;