m5stack / M5Core2

M5Core2 Arduino Library
MIT License
262 stars 113 forks source link

Add getVoltLow() to Core2 RTC class #137

Closed louisbertrand closed 1 month ago

louisbertrand commented 10 months ago

Please backport the method getVoltLow(void) from the M5Unified > utility > RTC8563_Class.cpp into Core2 class RTC. This method gets the VL bit in the seconds register to tell if the RTC experienced a low voltage that could invalidate the date and time reading.

bool RTC8563_Class::getVoltLow(void)
  {
    return readRegister8(0x02) & 0x80; // RTCC_VLSEC_MASK
  }

Thank you

Tinyu-Zhao commented 1 month ago

Merged, thanks.