Skip to content

Instantly share code, notes, and snippets.

@reefwing
Created December 12, 2022 22:25
Show Gist options
  • Select an option

  • Save reefwing/5867877c29aeb17870029d0ec309a73d to your computer and use it in GitHub Desktop.

Select an option

Save reefwing/5867877c29aeb17870029d0ec309a73d to your computer and use it in GitHub Desktop.
Extract from PCF8563 RTC Header File
class RTC_Date
{
public:
RTC_Date();
RTC_Date(const char *date, const char *time);
RTC_Date(uint16_t year,
uint8_t month,
uint8_t day,
uint8_t hour,
uint8_t minute,
uint8_t second
);
uint16_t year;
uint8_t month;
uint8_t day;
uint8_t hour;
uint8_t minute;
uint8_t second;
bool operator==(RTC_Date d);
private:
uint8_t StringToUint8(const char *pString);
};
class RTC_Alarm
{
public:
RTC_Alarm(void);
RTC_Alarm(
uint8_t minute,
uint8_t hour,
uint8_t day,
uint8_t weekday
);
uint8_t minute;
uint8_t hour;
uint8_t day;
uint8_t weekday;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment