Change interface to take array wrapper
This commit is contained in:
parent
6cc9c4e70c
commit
438765511c
7
eink.hpp
7
eink.hpp
@ -110,7 +110,8 @@ class Eink {
|
|||||||
_delay_ms(200);
|
_delay_ms(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw(const uint8_t *image)
|
template <typename Image>
|
||||||
|
static void draw(const Image &image)
|
||||||
{
|
{
|
||||||
constexpr auto BLOCK_SIZE = 5;
|
constexpr auto BLOCK_SIZE = 5;
|
||||||
|
|
||||||
@ -167,8 +168,8 @@ class Eink {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
sendImageChannel(Cmd::WRITE_RAM_BLACK, image);
|
sendImageChannel(Cmd::WRITE_RAM_BLACK, image.data());
|
||||||
sendImageChannel(Cmd::WRITE_RAM_RED, image);
|
sendImageChannel(Cmd::WRITE_RAM_RED, image.data());
|
||||||
|
|
||||||
sendCommand(Cmd::DISPLAY_UPDATE_CONTROL_2);
|
sendCommand(Cmd::DISPLAY_UPDATE_CONTROL_2);
|
||||||
sendData(0xF7);
|
sendData(0xF7);
|
||||||
|
Loading…
Reference in New Issue
Block a user