From 148a47f76a457514c0571345d59c2179842cd30d Mon Sep 17 00:00:00 2001
From: Joey Castillo <jose.castillo@gmail.com>
Date: Tue, 19 Oct 2021 15:37:08 -0400
Subject: movement: add tick animation in sleep mode

---
 watch-library/watch/watch_slcd.c | 4 ++++
 watch-library/watch/watch_slcd.h | 5 +++++
 2 files changed, 9 insertions(+)

(limited to 'watch-library')

diff --git a/watch-library/watch/watch_slcd.c b/watch-library/watch/watch_slcd.c
index 08f8c0e3..6c63d966 100644
--- a/watch-library/watch/watch_slcd.c
+++ b/watch-library/watch/watch_slcd.c
@@ -277,6 +277,10 @@ void watch_start_tick_animation(uint32_t duration) {
     slcd_sync_start_animation(&SEGMENT_LCD_0, segs, 1, duration);
 }
 
+bool watch_tick_animation_is_running() {
+    return hri_slcd_get_CTRLD_CSREN_bit(SLCD);
+}
+
 void watch_stop_tick_animation() {
     const uint32_t segs[] = { SLCD_SEGID(0, 2)};
     slcd_sync_stop_animation(&SEGMENT_LCD_0, segs, 1);
diff --git a/watch-library/watch/watch_slcd.h b/watch-library/watch/watch_slcd.h
index e18ee9b4..724d3dde 100644
--- a/watch-library/watch/watch_slcd.h
+++ b/watch-library/watch/watch_slcd.h
@@ -138,6 +138,11 @@ void watch_stop_blink();
   */
 void watch_start_tick_animation(uint32_t duration);
 
+/** @brief Checks if the tick animation is currently running.
+  * @return true if the animation is running; false otherwise.
+  */
+bool watch_tick_animation_is_running();
+
 /** @brief Stops the tick/tock animation and clears all animating segments.
   * @details This will stop the animation and clear all segments in position 8.
   */
-- 
cgit v1.2.3