m5stack / M5Core-Ink

M5Stack CoreInk Arduino Library
MIT License
44 stars 33 forks source link

M5CoreInk::shutdown(const RTC_TimeTypeDef &) not work #19

Closed thorv closed 1 year ago

thorv commented 2 years ago

when sleep with shutdown(RTC_TimeTypeDef), it not wake up at the time.

I tried

int RTC::SetAlarmIRQ(const RTC_TimeTypeDef &RTC_TimeStruct)
{
    uint8_t irq_enable = false;
    uint8_t out_buf[4] = {0x80, 0x80, 0x80, 0x80};

[snip]

    //out_buf[2] = 0x00; //remove
    //out_buf[3] = 0x00; //remove

    uint8_t reg_value = ReadReg(0x01);

it worked. out_buf[2], outbuf[3] should be invalid number as a date/dayofweek, I think.

Tinyu-Zhao commented 1 year ago

Fixed.https://github.com/m5stack/M5Core-Ink/commit/8276d8b95ac75a115f0b542f3a47621d494d61b7

Thank you for your help!