From 594904d9b0dbca452080f107aacb267aa13f4931 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Thu, 26 May 2022 15:16:39 +0200 Subject: [PATCH] Refactor pins to be user-provided --- eink/eink | 2 +- eink/main.cpp | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/eink/eink b/eink/eink index 2bad84d..1c01b17 160000 --- a/eink/eink +++ b/eink/eink @@ -1 +1 @@ -Subproject commit 2bad84d2e6cfc9b4f332f351e16534c1472094e2 +Subproject commit 1c01b17f4d0100127c54aeef16c09c99a3f277b1 diff --git a/eink/main.cpp b/eink/main.cpp index ee7c81e..d46ef5c 100644 --- a/eink/main.cpp +++ b/eink/main.cpp @@ -23,24 +23,19 @@ int main() serial << F("e-Paper demo") << F("\r\n"); - Epd epd; - if (epd.Init() != 0) { - serial << F("e-Paper init failed") << F("\r\n"); - serial.flushTx(); - _delay_ms(1000); - return 0; - } + Epd eink; + eink.Init(); serial << F("e-Paper init") << F("\r\n"); serial << F("e-Paper clear") << F("\r\n"); - epd.DisplayClear(); + eink.DisplayClear(); serial << F("e-Paper draw") << F("\r\n"); - epd.DisplayFrame(IMAGE_BLACK, IMAGE_RED); + eink.DisplayFrame(IMAGE_BLACK, IMAGE_RED); serial << F("e-Paper sleep") << F("\r\n"); - epd.Sleep(); + eink.Sleep(); while (true) { serial << F("e-Paper running") << F("\r\n");