diff --git a/.gitmodules b/.gitmodules index 0078131..03a7fa7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "eink/spi"] path = eink/spi url = git@git.blackmark.me:avr/spi.git +[submodule "eink/avr-libstdcpp"] + path = eink/avr-libstdcpp + url = git@github.com:modm-io/avr-libstdcpp.git diff --git a/eink/Makefile b/eink/Makefile index dce3670..2a6479f 100644 --- a/eink/Makefile +++ b/eink/Makefile @@ -10,7 +10,7 @@ FUSES = -U lfuse:w:0xff:m -U hfuse:w:0xd7:m -U efuse:w:0xfd:m # Parameters PROJECT = $(lastword $(subst /, ,$(CURDIR))) -INCS = +INCS = -isystem avr-libstdcpp/include LIBS = DEFS = -DNDEBUG diff --git a/eink/avr-libstdcpp b/eink/avr-libstdcpp new file mode 160000 index 0000000..d289637 --- /dev/null +++ b/eink/avr-libstdcpp @@ -0,0 +1 @@ +Subproject commit d289637d14cb9928a3690be4f2934aa2920f0f38 diff --git a/eink/eink.cppproj b/eink/eink.cppproj index 53b2ac8..5c9c6ed 100644 --- a/eink/eink.cppproj +++ b/eink/eink.cppproj @@ -140,7 +140,7 @@ True True True - -fno-threadsafe-statics -Wextra -Wno-array-bounds -std=c++20 + -fno-threadsafe-statics -Wextra -Wno-array-bounds -std=c++20 -isystem"%24(ProjectDir)/avr-libstdcpp/include" libm @@ -199,7 +199,7 @@ Maximum (-g3) True True - -fno-threadsafe-statics -Wextra -std=c++20 + -fno-threadsafe-statics -Wextra -std=c++20 -isystem"%24(ProjectDir)/avr-libstdcpp/include" libm diff --git a/eink/main.cpp b/eink/main.cpp index 759087c..e7e1207 100644 --- a/eink/main.cpp +++ b/eink/main.cpp @@ -1,18 +1,19 @@ #include "clock.hpp" +#include + #include "eink/eink.hpp" #include "flash/flash.hpp" #include "io/io.hpp" #include "spi/spi.hpp" #include "uart/uart.hpp" -#include "util/array.hpp" using uart_t = uart::Uart0<>; REGISTER_UART0_INT_VECTORS(uart_t); ////////////////////////////////////////////////////////////////////////// -constexpr auto IMAGE [[gnu::progmem]] = util::to_array({ +constexpr auto IMAGE [[gnu::progmem]] = std::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,