M5EPD icon indicating copy to clipboard operation
M5EPD copied to clipboard

Massive refactoring for BM8563

Open estshorter opened this issue 4 years ago • 0 comments

Changelog

Added

  • Add getDateTime() and setDateTime()
  • Getters and setters accept a reference as a parameter for consistency

Changed

  • New member variable _wire which is a reference to a TwoWire instance. Users can select which instance to use (Wire or Wire1). Default: Wire (no change)
  • begin() accepts parameters for TwoWire::begin() to give users flexiblity.

Removed

  • Remove magic numbers (registers and masks) by using struct and enum
  • Remove getTime(void)
  • Remove redundant casts

Fixed

  • Fix a bug that date conditions are not disabled in setAlarmIRQ(const rtc_time_t) (see https://github.com/m5stack/M5-CoreInk/pull/3)

Note

No API breakage except for removing getTime(void). I believe this is not an issue because this function only sets a private member variable trdata to data from BM8563, and trdata is not used in the other functions.

estshorter avatar Feb 03 '21 10:02 estshorter