mirror of https://github.com/sqfmi/Watchy.git
Compare commits
7 Commits
6e912eb6c9
...
7e1eb82420
Author | SHA1 | Date |
---|---|---|
DarkZeros | 7e1eb82420 | |
Daniel Ansorregui | f369b6f207 | |
Daniel Ansorregui | 8103df1499 | |
Daniel Ansorregui | 84c0cd106c | |
Daniel Ansorregui | 3ce125247d | |
Daniel Ansorregui | f2c0c91a61 | |
Daniel Ansorregui | 2b21e50c2f |
|
@ -31,6 +31,9 @@ WatchyDisplay::WatchyDisplay() :
|
|||
// Setup callback and SPI by default
|
||||
selectSPI(SPI, SPISettings(20000000, MSBFIRST, SPI_MODE0));
|
||||
setBusyCallback(busyCallback);
|
||||
}
|
||||
|
||||
void WatchyDisplay::initWatchy() {
|
||||
// Watchy default initialization
|
||||
init(0, displayFullInit, 2, true);
|
||||
}
|
||||
|
@ -419,11 +422,14 @@ void WatchyDisplay::_InitDisplay()
|
|||
_transfer(0x00);
|
||||
|
||||
if (reduceBoosterTime) {
|
||||
// SSD1675B controller datasheet
|
||||
_transferCommand(0x0C); // BOOSTER_SOFT_START_CONTROL
|
||||
_transfer(0x80); // Needs to be at least 0x80
|
||||
_transfer(0x00); // Aggresive lowest possible delay, out of spec (worked ok for me)
|
||||
_transfer(0x00); // Aggresive lowest possible delay, out of spec (worked ok for me)
|
||||
_transfer(0x80); // Undocumented booster delay, 0x80 seems ok
|
||||
// Set the driving strength of GDR for all phases to maximun 0b111 -> 0xF
|
||||
// Set the minimum off time of GDR to minimum 0x4 (values below sould be same)
|
||||
_transfer(0xF4); // Phase1 Default value 0x8B
|
||||
_transfer(0xF4); // Phase2 Default value 0x9C
|
||||
_transfer(0xF4); // Phase3 Default value 0x96
|
||||
_transfer(0x00); // Duration of phases, Default 0xF = 0b00 11 11 (40ms Phase 1/2, 10ms Phase 3)
|
||||
}
|
||||
|
||||
_transferCommand(0x18); // Read built-in temperature sensor
|
||||
|
|
|
@ -35,6 +35,7 @@ class WatchyDisplay : public GxEPD2_EPD
|
|||
static const uint16_t partial_refresh_time = 500; // ms, e.g. 457282us
|
||||
// constructor
|
||||
WatchyDisplay();
|
||||
void initWatchy();
|
||||
void setDarkBorder(bool darkBorder);
|
||||
void asyncPowerOn();
|
||||
void _PowerOnAsync();
|
||||
|
|
|
@ -21,6 +21,9 @@ void Watchy::init(String datetime) {
|
|||
Wire.begin(SDA, SCL); // init i2c
|
||||
RTC.init();
|
||||
|
||||
// Init the display since is almost sure we will use it
|
||||
display.epd2.initWatchy();
|
||||
|
||||
switch (wakeup_reason) {
|
||||
case ESP_SLEEP_WAKEUP_EXT0: // RTC Alarm
|
||||
RTC.read(currentTime);
|
||||
|
|
Loading…
Reference in New Issue