]> git.earman.xyz Git - sensor-watch.git/commitdiff
remove obsolete low battery check
authorJoey Castillo <joeycastillo@utexas.edu>
Sun, 13 Feb 2022 19:00:50 +0000 (14:00 -0500)
committerJoey Castillo <joeycastillo@utexas.edu>
Sun, 13 Feb 2022 19:01:21 +0000 (14:01 -0500)
watch-library/hardware/watch/watch.c
watch-library/shared/watch/watch.h

index 791fd974994abf46d9d52d99d881fef048d6d20d..934d562391126595ead319e9877fc2a4c698dc7d 100644 (file)
 
 #include "watch.h"
 
-bool battery_is_low = false;
-
 // receives interrupts from MCLK, OSC32KCTRL, OSCCTRL, PAC, PM, SUPC and TAL, whatever that is.
 void SYSTEM_Handler(void) {
     if (SUPC->INTFLAG.bit.BOD33DET) {
-        battery_is_low = true;
         SUPC->INTENCLR.bit.BOD33DET = 1;
         SUPC->INTFLAG.reg &= ~SUPC_INTFLAG_BOD33DET;
     }
 }
 
-bool watch_is_battery_low(void) {
-    return battery_is_low;
-}
-
 bool watch_is_buzzer_or_led_enabled(void){
     return hri_mclk_get_APBCMASK_TCC0_bit(MCLK);
 }
index 3fbad812313f89b73dab30cd955b779eacb56556..b84ada29d130ff7aa68b1cdbb23ab91637cb2911 100644 (file)
 
 #include "watch_private.h"
 
-/** @brief Returns true when the battery voltage dips below 2.5V.
-  * @details A CR2016 battery will have a nominal voltage between 2.9 and 3 volts for most of its lifespan. Once the battery
-  *          discharges to about 60%, the voltage will drift slightly lower; this may manifest as a dimmer LED. By the time
-  *          the battery voltage has fallen to 2.5 volts, it will have probably less than 10% of its capacity remaining, and
-  *          you can expect the voltage to drop relatively quickly as the battery dies.
-  */
-bool watch_is_battery_low(void);
-
 /** @brief Returns true if either the buzzer or the LED driver is enabled.
   * @details Both the buzzer and the LED use the TCC peripheral to drive their behavior. This function returns true if that
   *          peripheral is enabled. You can use this function to determine whether you need to call the watch_disable_leds or