]> git.earman.xyz Git - sensor-watch.git/commitdiff
reduce flicker of LED by default
authorJoey Castillo <joeycastillo@utexas.edu>
Mon, 4 Jul 2022 16:23:09 +0000 (11:23 -0500)
committerJoey Castillo <joeycastillo@utexas.edu>
Mon, 4 Jul 2022 16:23:09 +0000 (11:23 -0500)
watch-library/hardware/watch/watch_private.c

index e4a03926a2f1019cdbadaaf9dcc57e337e639049..4b010d4a2ede3d3af5302cabfa72ff18a681e485 100644 (file)
@@ -142,7 +142,7 @@ void _watch_enable_tcc(void) {
     #endif
     // The buzzer will set the period depending on the tone it wants to play, but we have to set some period here to
     // get the LED working. Almost any period will do, tho it should be below 20000 (i.e. 50 Hz) to avoid flickering.
-    hri_tcc_write_PER_reg(TCC0, 4096);
+    hri_tcc_write_PER_reg(TCC0, 1024);
     // Set the duty cycle of all pins to 0: LED's off, buzzer not buzzing.
     hri_tcc_write_CC_reg(TCC0, WATCH_BUZZER_TCC_CHANNEL, 0);
     hri_tcc_write_CC_reg(TCC0, WATCH_RED_TCC_CHANNEL, 0);