Change interface to take array wrapper

This commit is contained in:
BlackMark 2022-05-27 20:39:51 +02:00
parent 6cc9c4e70c
commit 438765511c

View File

@ -110,7 +110,8 @@ class Eink {
_delay_ms(200);
}
static void draw(const uint8_t *image)
template <typename Image>
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);