From 3a9ce6b37dfead917ed2f1607be4031c8f5d39bb Mon Sep 17 00:00:00 2001 From: BlackMark Date: Fri, 27 May 2022 20:40:32 +0200 Subject: [PATCH] Make use of C++ array wrapper --- eink/eink | 2 +- eink/eink.cppproj | 3 +++ eink/main.cpp | 8 ++++---- eink/util | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eink/eink b/eink/eink index 6cc9c4e..4387655 160000 --- a/eink/eink +++ b/eink/eink @@ -1 +1 @@ -Subproject commit 6cc9c4e70c19fd7fd40a3f588384d77c7cf60e38 +Subproject commit 438765511c8965357b20c3f46e092da5fd00aba1 diff --git a/eink/eink.cppproj b/eink/eink.cppproj index a5e0dbf..911c6ce 100644 --- a/eink/eink.cppproj +++ b/eink/eink.cppproj @@ -257,6 +257,9 @@ compile + + compile + compile diff --git a/eink/main.cpp b/eink/main.cpp index 4e19973..dd29bc5 100644 --- a/eink/main.cpp +++ b/eink/main.cpp @@ -1,18 +1,18 @@ #include "clock.hpp" +#include "eink/eink.hpp" #include "flash/flash.hpp" #include "io/io.hpp" #include "spi/spi.hpp" #include "uart/uart.hpp" - -#include "eink/eink.hpp" +#include "util/array.hpp" using uart_t = uart::Uart0<>; REGISTER_UART0_INT_VECTORS(uart_t); ////////////////////////////////////////////////////////////////////////// -const uint8_t IMAGE[] PROGMEM = { +constexpr auto IMAGE [[gnu::progmem]] = util::to_array({ 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x85, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x85, 0x79, 0x79, 0x79, @@ -435,7 +435,7 @@ const uint8_t IMAGE[] PROGMEM = { 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, -}; +}); ////////////////////////////////////////////////////////////////////////// diff --git a/eink/util b/eink/util index 632ed6c..5282fdd 160000 --- a/eink/util +++ b/eink/util @@ -1 +1 @@ -Subproject commit 632ed6cf41c45786c738732d6e10d3d2bf988690 +Subproject commit 5282fdde4636016314befe7110a7d4573c597c7c