Make use of C++ array wrapper

This commit is contained in:
2022-05-27 20:40:32 +02:00
parent 9487454a9d
commit 3a9ce6b37d
4 changed files with 9 additions and 6 deletions

Submodule eink/eink updated: 6cc9c4e70c...438765511c

View File

@@ -257,6 +257,9 @@
<Compile Include="uart\uart.hpp"> <Compile Include="uart\uart.hpp">
<SubType>compile</SubType> <SubType>compile</SubType>
</Compile> </Compile>
<Compile Include="util\array.hpp">
<SubType>compile</SubType>
</Compile>
<Compile Include="util\func.hpp"> <Compile Include="util\func.hpp">
<SubType>compile</SubType> <SubType>compile</SubType>
</Compile> </Compile>

View File

@@ -1,18 +1,18 @@
#include "clock.hpp" #include "clock.hpp"
#include "eink/eink.hpp"
#include "flash/flash.hpp" #include "flash/flash.hpp"
#include "io/io.hpp" #include "io/io.hpp"
#include "spi/spi.hpp" #include "spi/spi.hpp"
#include "uart/uart.hpp" #include "uart/uart.hpp"
#include "util/array.hpp"
#include "eink/eink.hpp"
using uart_t = uart::Uart0<>; using uart_t = uart::Uart0<>;
REGISTER_UART0_INT_VECTORS(uart_t); REGISTER_UART0_INT_VECTORS(uart_t);
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
const uint8_t IMAGE[] PROGMEM = { constexpr auto IMAGE [[gnu::progmem]] = util::to_array<uint8_t>({
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, 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, 0x79, 0x79, 0x79, 0x79,
0x79, 0x79, 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, 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, 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,
}; });
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////