m5stack / M5Core2

M5Core2 Arduino Library
MIT License
267 stars 117 forks source link

Add getVoltLow() to Core2 RTC class #137

Closed louisbertrand closed 4 months ago

louisbertrand commented 1 year 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 4 months ago

Merged, thanks.