fixed code format on last commit + added partial test.
This commit is contained in:
parent
fc268c7655
commit
ef1a7f79b6
|
@ -497,7 +497,8 @@ void Inkplate::einkOff()
|
||||||
WAKEUP_CLEAR;
|
WAKEUP_CLEAR;
|
||||||
|
|
||||||
unsigned long timer = millis();
|
unsigned long timer = millis();
|
||||||
do {
|
do
|
||||||
|
{
|
||||||
delay(1);
|
delay(1);
|
||||||
} while ((readPowerGood() != 0) && (millis() - timer) < 250);
|
} while ((readPowerGood() != 0) && (millis() - timer) < 250);
|
||||||
|
|
||||||
|
@ -531,7 +532,8 @@ void Inkplate::einkOn()
|
||||||
VCOM_SET;
|
VCOM_SET;
|
||||||
|
|
||||||
unsigned long timer = millis();
|
unsigned long timer = millis();
|
||||||
do {
|
do
|
||||||
|
{
|
||||||
delay(1);
|
delay(1);
|
||||||
} while ((readPowerGood() != PWR_GOOD_OK) && (millis() - timer) < 250);
|
} while ((readPowerGood() != PWR_GOOD_OK) && (millis() - timer) < 250);
|
||||||
if ((millis() - timer) >= 250)
|
if ((millis() - timer) >= 250)
|
||||||
|
@ -546,7 +548,8 @@ void Inkplate::einkOn()
|
||||||
setPanelState(1);
|
setPanelState(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t Inkplate::readPowerGood() {
|
uint8_t Inkplate::readPowerGood()
|
||||||
|
{
|
||||||
Wire.beginTransmission(0x48);
|
Wire.beginTransmission(0x48);
|
||||||
Wire.write(0x0F);
|
Wire.write(0x0F);
|
||||||
Wire.endTransmission();
|
Wire.endTransmission();
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#include "Inkplate.h"
|
||||||
|
|
||||||
|
Inkplate display(INKPLATE_1BIT);
|
||||||
|
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
Serial.begin(115200);
|
||||||
|
display.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
for (int j = 0; j < 50; ++j)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 100; ++i)
|
||||||
|
display.drawFastVLine(i * 5 + j * 3, 0, 600, BLACK);
|
||||||
|
for (int i = 0; i < 100; ++i)
|
||||||
|
display.drawFastHLine(j * 3, i * 5, 800, BLACK);
|
||||||
|
display.partialUpdate();
|
||||||
|
display.clearDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
display.clean();
|
||||||
|
display.display();
|
||||||
|
}
|
Loading…
Reference in New Issue