Allow image and LUT to be located either in ram or flash
This commit is contained in:
Submodule eink/eink updated: 8d8369440c...3d45d2a4b3
Submodule eink/flash updated: f9014aea6c...ceec87f921
@@ -6,7 +6,9 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
constexpr auto RLE_IMAGE [[gnu::progmem]] = std::tuple{
|
||||
#include "flash/flash.hpp"
|
||||
|
||||
constexpr auto RLE_IMAGE = flash::Wrapper{std::tuple{
|
||||
std::to_array<std::pair<std::uint8_t, std::uint8_t>>({
|
||||
{255, 0xff}, {17, 0xff}, {1, 0x0f}, {3, 0xff}, {1, 0xc0}, {2, 0x00}, {1, 0x01}, {7, 0xff}, {1, 0xfe},
|
||||
{1, 0x07}, {1, 0xf0}, {1, 0x3f}, {2, 0xff}, {1, 0xfe}, {1, 0x07}, {1, 0xf0}, {1, 0x3e}, {1, 0x07},
|
||||
@@ -283,4 +285,4 @@ constexpr auto RLE_IMAGE [[gnu::progmem]] = std::tuple{
|
||||
{22, 0xff}, {1, 0xfe}, {1, 0x00}, {1, 0x3f}, {23, 0xff}, {1, 0x81}, {255, 0xff}, {255, 0xff}, {255, 0xff},
|
||||
{255, 0xff}, {81, 0xff},
|
||||
}),
|
||||
};
|
||||
}};
|
||||
|
||||
@@ -24,8 +24,9 @@ using eink::Voltage::VSH2;
|
||||
using eink::Voltage::VSL1;
|
||||
using eink::Voltage::VSS1;
|
||||
|
||||
constexpr auto ORIGINAL_WAVEFORM_LUT
|
||||
[[gnu::progmem]] =
|
||||
constexpr auto
|
||||
ORIGINAL_WAVEFORM_LUT =
|
||||
flash::Wrapper<eink::Waveform>{
|
||||
eink::Waveform{
|
||||
.lut = {{{
|
||||
{.phaseD = VSH1, .phaseC = VSH1, .phaseB = VSS1, .phaseA = VSH1},
|
||||
@@ -210,11 +211,11 @@ constexpr auto ORIGINAL_WAVEFORM_LUT
|
||||
},
|
||||
.frameRates = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
|
||||
.subPhaseGateStates = {},
|
||||
};
|
||||
}};
|
||||
|
||||
static inline constexpr auto createFastWaveformLut(const eink::Waveform &original)
|
||||
static inline consteval auto createFastWaveformLut(const flash::Wrapper<eink::Waveform> &original)
|
||||
{
|
||||
auto fastWaveformLut = original;
|
||||
auto fastWaveformLut = original.value;
|
||||
|
||||
for (auto &timing : fastWaveformLut.timings) {
|
||||
timing.repeatSubPhaseAB = 0;
|
||||
@@ -222,10 +223,10 @@ static inline constexpr auto createFastWaveformLut(const eink::Waveform &origina
|
||||
timing.repeat = 0;
|
||||
}
|
||||
|
||||
return fastWaveformLut;
|
||||
return flash::Wrapper{fastWaveformLut};
|
||||
}
|
||||
|
||||
constexpr auto FAST_WAVEFORM_LUT [[gnu::progmem]] = createFastWaveformLut(ORIGINAL_WAVEFORM_LUT);
|
||||
constexpr auto FAST_WAVEFORM_LUT = createFastWaveformLut(ORIGINAL_WAVEFORM_LUT);
|
||||
|
||||
void dumpOTP(eink_t &einkDisplay, uart_t &serial)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user