diff options
| -rw-r--r-- | watch-library/watch/watch_slcd.c | 6 | ||||
| -rw-r--r-- | watch-library/watch/watch_slcd.h | 4 | 
2 files changed, 10 insertions, 0 deletions
| diff --git a/watch-library/watch/watch_slcd.c b/watch-library/watch/watch_slcd.c index ba9d12b2..c1e24308 100644 --- a/watch-library/watch/watch_slcd.c +++ b/watch-library/watch/watch_slcd.c @@ -162,6 +162,12 @@ inline void watch_clear_pixel(uint8_t com, uint8_t seg) {      slcd_sync_seg_off(&SEGMENT_LCD_0, SLCD_SEGID(com, seg));  } +void watch_clear_display() { +    SLCD->SDATAL0.reg = 0; +    SLCD->SDATAL1.reg = 0; +    SLCD->SDATAL2.reg = 0; +} +  void watch_display_character(uint8_t character, uint8_t position) {      // handle lowercase 7 if needed      if (character == '7' && (position == 4 || position == 6)) character = '&'; diff --git a/watch-library/watch/watch_slcd.h b/watch-library/watch/watch_slcd.h index 4f5a617c..5a54b72e 100644 --- a/watch-library/watch/watch_slcd.h +++ b/watch-library/watch/watch_slcd.h @@ -69,6 +69,10 @@ void watch_set_pixel(uint8_t com, uint8_t seg);    */  void watch_clear_pixel(uint8_t com, uint8_t seg); +/** @brief Clears all segments of the display, including incicators and the colon. +  */ +void watch_clear_display(); +  /** @brief Displays a string at the given position, starting from the top left. There are ten digits.             A space in any position will clear that digit.    * @param string A null-terminated string. | 
