diff --git a/examples/HelloWorld/HelloWorld.ino b/examples/HelloWorld/HelloWorld.ino index 1803d27..6543b87 100644 --- a/examples/HelloWorld/HelloWorld.ino +++ b/examples/HelloWorld/HelloWorld.ino @@ -10,7 +10,8 @@ void setup() { Serial.printf("Ink Init faild"); while (1) delay(100); } - M5.M5Ink.clear(); + M5.M5Ink.clear(INK_CLEAR_MODE1); // seems to need use MODE1 after first clear after boot + // M5.M5Ink.clear(); delay(1000); //creat ink refresh Sprite if( InkPageSprite.creatSprite(0,0,200,200,true) != 0 ) diff --git a/src/utility/BM8563.cpp b/src/utility/BM8563.cpp index f0d1382..3760e28 100644 --- a/src/utility/BM8563.cpp +++ b/src/utility/BM8563.cpp @@ -268,8 +268,8 @@ int RTC::SetAlarmIRQ(const RTC_TimeTypeDef &RTC_TimeStruct) out_buf[1] = ByteToBcd2(RTC_TimeStruct.Hours) & 0x3f; } - out_buf[2] = 0x00; - out_buf[3] = 0x00; + out_buf[2] = 0x80; // always TRUE for date condition + out_buf[3] = 0x80; // always TRUE for date condition uint8_t reg_value = ReadReg(0x01); diff --git a/src/utility/Ink_eSPI.h b/src/utility/Ink_eSPI.h index 883b993..51f9341 100644 --- a/src/utility/Ink_eSPI.h +++ b/src/utility/Ink_eSPI.h @@ -18,7 +18,7 @@ extern SPIClass ink_spi; #define INK_FULL_MODE 0x00 #define INK_PARTIAL_MODE 0x01 -#define INK_CLENR_MODE0 0 +#define INK_CLEAR_MODE0 0 #define INK_CLEAR_MODE1 1 @@ -76,7 +76,7 @@ class Ink_eSPI bool isInit(); int writeInitList(const unsigned char* list); - int clear(int mode = INK_CLENR_MODE0); + int clear(int mode = INK_CLEAR_MODE0); int clearDSRAM(); int drawBuff(uint8_t* buff, bool bitMode = true); int drawBuff(uint8_t* lastbuff,uint8_t* buff,size_t size); @@ -114,4 +114,4 @@ class Ink_eSPI -#endif \ No newline at end of file +#endif