Implement custom spi protocol
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -13,9 +13,6 @@
|
|||||||
[submodule "eink/flash"]
|
[submodule "eink/flash"]
|
||||||
path = eink/flash
|
path = eink/flash
|
||||||
url = git@git.blackmark.me:avr/flash.git
|
url = git@git.blackmark.me:avr/flash.git
|
||||||
[submodule "eink/spi"]
|
|
||||||
path = eink/spi
|
|
||||||
url = git@git.blackmark.me:avr/spi.git
|
|
||||||
[submodule "eink/avr-libstdcpp"]
|
[submodule "eink/avr-libstdcpp"]
|
||||||
path = eink/avr-libstdcpp
|
path = eink/avr-libstdcpp
|
||||||
url = git@github.com:modm-io/avr-libstdcpp.git
|
url = git@github.com:modm-io/avr-libstdcpp.git
|
||||||
|
|||||||
Submodule eink/eink updated: 83a064ddc1...113931f8ba
@@ -218,6 +218,9 @@
|
|||||||
<Compile Include="clock.hpp">
|
<Compile Include="clock.hpp">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="eink\eink_spi.hpp">
|
||||||
|
<SubType>compile</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="eink\eink.hpp">
|
<Compile Include="eink\eink.hpp">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -230,18 +233,6 @@
|
|||||||
<Compile Include="main.cpp">
|
<Compile Include="main.cpp">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="spi\config.hpp">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="spi\hardware.hpp">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="spi\software.hpp">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="spi\spi.hpp">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="uart\config.hpp">
|
<Compile Include="uart\config.hpp">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -268,7 +259,6 @@
|
|||||||
<Folder Include="flash" />
|
<Folder Include="flash" />
|
||||||
<Folder Include="io" />
|
<Folder Include="io" />
|
||||||
<Folder Include="eink" />
|
<Folder Include="eink" />
|
||||||
<Folder Include="spi" />
|
|
||||||
<Folder Include="util" />
|
<Folder Include="util" />
|
||||||
<Folder Include="uart" />
|
<Folder Include="uart" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include "eink/eink.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 "uart/uart.hpp"
|
#include "uart/uart.hpp"
|
||||||
|
|
||||||
using uart_t = uart::Uart0<>;
|
using uart_t = uart::Uart0<>;
|
||||||
@@ -300,7 +299,7 @@ constexpr auto RLE_IMAGE [[gnu::progmem]] = std::tuple{
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
using spi_t = spi::Software<spi::SoftwareConfig<io::P::C4, io::P::NONE, io::P::C5, io::P::C3>>;
|
using spi_t = eink::Spi<io::P::C4, io::P::C5, io::P::C3, io::P::C2>;
|
||||||
|
|
||||||
uart_t serial;
|
uart_t serial;
|
||||||
serial.init();
|
serial.init();
|
||||||
@@ -309,7 +308,7 @@ int main()
|
|||||||
|
|
||||||
serial << F("e-Paper demo") << F("\r\n");
|
serial << F("e-Paper demo") << F("\r\n");
|
||||||
|
|
||||||
auto einkDisplay = eink::Eink<200, 200, spi_t, io::P::C1, io::P::C2, io::P::C0>{};
|
auto einkDisplay = eink::Eink<200, 200, spi_t, io::P::C1, io::P::C0>{};
|
||||||
einkDisplay.init();
|
einkDisplay.init();
|
||||||
|
|
||||||
serial << F("e-Paper init") << F("\r\n");
|
serial << F("e-Paper init") << F("\r\n");
|
||||||
@@ -317,6 +316,9 @@ int main()
|
|||||||
serial << F("e-Paper clear") << F("\r\n");
|
serial << F("e-Paper clear") << F("\r\n");
|
||||||
einkDisplay.clear();
|
einkDisplay.clear();
|
||||||
|
|
||||||
|
serial << F("e-Paper autofill") << F("\r\n");
|
||||||
|
einkDisplay.autoPatternFill();
|
||||||
|
|
||||||
serial << F("e-Paper draw") << F("\r\n");
|
serial << F("e-Paper draw") << F("\r\n");
|
||||||
einkDisplay.draw(RLE_IMAGE);
|
einkDisplay.draw(RLE_IMAGE);
|
||||||
|
|
||||||
|
|||||||
1
eink/spi
1
eink/spi
Submodule eink/spi deleted from 8bf3d1a874
Reference in New Issue
Block a user