diff --git a/examples/Test/build_test/platformio_native.ini b/examples/Test/build_test/platformio_native.ini
index bfe2e39d..ff2c1136 100644
--- a/examples/Test/build_test/platformio_native.ini
+++ b/examples/Test/build_test/platformio_native.ini
@@ -1,4 +1,3 @@
-
[env:native-default]
platform = https://github.com/geeksville/platform-native.git
;build_flags = ${env.build_flags} -O0 -lgpiod
@@ -24,7 +23,7 @@ build_flags = -O0 -xc++ -std=c++14
[env:native-portduino]
-platform = https://github.com/meshtastic/platform-native.git#659e49346aa33008b150dfb206b1817ddabc7132
+platform = https://github.com/meshtastic/platform-native.git#784007630ca43b4811c6637606440588bb5acf39
framework = arduino
board = cross_platform
;build_src_filter = +<**/*.cpp> -
@@ -41,4 +40,4 @@ build_flags =
lib_deps =
SPI
Wire
- LovyanGFX
+ LovyanGFX
\ No newline at end of file
diff --git a/examples/Test/build_test/portduino/main.cpp b/examples/Test/build_test/portduino/main.cpp
index 8442ff45..0bb562d8 100644
--- a/examples/Test/build_test/portduino/main.cpp
+++ b/examples/Test/build_test/portduino/main.cpp
@@ -8,8 +8,6 @@ void setup()
initGPIOPin(25, "gpiochip4");
initGPIOPin(24, "gpiochip4");
- DisplaySPI = new HardwareSPI;
- DisplaySPI->begin("/dev/spidev0.0");
Wire.begin(1);
display = new LGFX();
display->init();
@@ -18,6 +16,10 @@ void setup()
canvas.setFont(&fonts::lgfxJapanMinchoP_32);
canvas.setTextWrap(false); // 右端到達時のカーソル折り返しを禁止
canvas.createSprite(display->width(), 36);
+ canvas.clear();
+ canvas.setCursor(0, 0);
+ canvas.printf("Touch to start\n");
+ canvas.pushSprite(display, 0, 0);
}
diff --git a/examples/Test/build_test/portduino/main.h b/examples/Test/build_test/portduino/main.h
index 558c8302..6d8f226b 100644
--- a/examples/Test/build_test/portduino/main.h
+++ b/examples/Test/build_test/portduino/main.h
@@ -6,7 +6,6 @@
#include "PortduinoGPIO.h"
#include
-HardwareSPI *DisplaySPI;
int initGPIOPin(int pinNum, std::string gpioChipName);
class LGFX : public lgfx::LGFX_Device
@@ -25,7 +24,11 @@ class LGFX : public lgfx::LGFX_Device
auto buscfg = _bus_instance.config();
buscfg.spi_mode = 0;
buscfg.pin_dc = 25;
- _bus_instance.spi_device(DisplaySPI);
+
+ // to use spidevX.Y
+ int x = 0;
+ int y = 0;
+ buscfg.spi_host = x + y << 4;
_bus_instance.config(buscfg); // applies the set value to the bus.
_panel_instance.setBus(&_bus_instance); // set the bus on the panel.
}