From a2060c3ab51c25785852a740970ba057120e1749 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sat, 4 Jun 2022 13:24:31 +0200 Subject: [PATCH] Implement basic font rendering --- eink/eink | 2 +- eink/eink.cppproj | 3 +++ eink/main.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 64 insertions(+), 8 deletions(-) diff --git a/eink/eink b/eink/eink index 3d45d2a..e62a7ed 160000 --- a/eink/eink +++ b/eink/eink @@ -1 +1 @@ -Subproject commit 3d45d2a4b393724f3eb618d49936adc7ee168d1b +Subproject commit e62a7ed49800dfae0337f5d62d12e1fcae8431fb diff --git a/eink/eink.cppproj b/eink/eink.cppproj index f021aa5..05bcc90 100644 --- a/eink/eink.cppproj +++ b/eink/eink.cppproj @@ -224,6 +224,9 @@ compile + + compile + compile diff --git a/eink/main.cpp b/eink/main.cpp index 9dd37d0..521ee2a 100644 --- a/eink/main.cpp +++ b/eink/main.cpp @@ -217,12 +217,24 @@ static inline consteval auto createFastWaveformLut(const flash::WrapperB: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY}, "Black on black", eink_t::Color::BLACK, eink_t::Color::BLACK); + einkDisplay.drawText({startX, startY + 10}, "B->R: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 10}, "Black on red", eink_t::Color::BLACK, eink_t::Color::RED); + einkDisplay.drawText({startX, startY + 20}, "B->W: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 20}, "Black on white", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX, startY + 30}, "R->B: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 30}, "Red on black", eink_t::Color::RED, eink_t::Color::BLACK); + einkDisplay.drawText({startX, startY + 40}, "R->R: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 40}, "Red on red", eink_t::Color::RED, eink_t::Color::RED); + einkDisplay.drawText({startX, startY + 50}, "R->W: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 50}, "Red on white", eink_t::Color::RED, eink_t::Color::WHITE); + einkDisplay.drawText({startX, startY + 60}, "W->B: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 60}, "White on black", eink_t::Color::WHITE, eink_t::Color::BLACK); + einkDisplay.drawText({startX, startY + 70}, "W->R: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 70}, "White on red", eink_t::Color::WHITE, eink_t::Color::RED); + einkDisplay.drawText({startX, startY + 80}, "W->W: ", eink_t::Color::BLACK, eink_t::Color::WHITE); + einkDisplay.drawText({startX + 6 * 8, startY + 80}, "White on white", eink_t::Color::WHITE, eink_t::Color::WHITE); + + serial << F("e-Paper update") << F("\r\n"); + einkDisplay.update(); serial << F("e-Paper sleep") << F("\r\n"); einkDisplay.sleep();