From 438765511c8965357b20c3f46e092da5fd00aba1 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Fri, 27 May 2022 20:39:51 +0200 Subject: [PATCH] Change interface to take array wrapper --- eink.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eink.hpp b/eink.hpp index 88c27eb..f8c9daa 100644 --- a/eink.hpp +++ b/eink.hpp @@ -110,7 +110,8 @@ class Eink { _delay_ms(200); } - static void draw(const uint8_t *image) + template + static void draw(const Image &image) { constexpr auto BLOCK_SIZE = 5; @@ -167,8 +168,8 @@ class Eink { } }; - sendImageChannel(Cmd::WRITE_RAM_BLACK, image); - sendImageChannel(Cmd::WRITE_RAM_RED, image); + sendImageChannel(Cmd::WRITE_RAM_BLACK, image.data()); + sendImageChannel(Cmd::WRITE_RAM_RED, image.data()); sendCommand(Cmd::DISPLAY_UPDATE_CONTROL_2); sendData(0xF7);