aboutsummaryrefslogtreecommitdiff
path: root/examples/PIO_TestPatterns
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2023-01-30 04:20:07 +0000
committerGitHub <noreply@github.com>2023-01-30 04:20:07 +0000
commitc23e8878188e4a8f5d298670a40e98521deea133 (patch)
treeab27d81c2edf99d70f0179f863904bb7aa173346 /examples/PIO_TestPatterns
parentfd5aba705456ea6f87069a7942aaaf849263eeeb (diff)
parenta85b0e649ffa9da618b1610cecd212b72800d3bc (diff)
Merge pull request #385 from elliotmatson/master
Move CI to a matrix, add ESP-IDF coverage
Diffstat (limited to 'examples/PIO_TestPatterns')
-rw-r--r--examples/PIO_TestPatterns/platformio.ini81
-rw-r--r--examples/PIO_TestPatterns/sdkconfig.defaults3
-rw-r--r--examples/PIO_TestPatterns/src/main.cpp12
3 files changed, 15 insertions, 81 deletions
diff --git a/examples/PIO_TestPatterns/platformio.ini b/examples/PIO_TestPatterns/platformio.ini
index 3505b2d..185513a 100644
--- a/examples/PIO_TestPatterns/platformio.ini
+++ b/examples/PIO_TestPatterns/platformio.ini
@@ -1,90 +1,23 @@
[platformio]
-;default_envs = esp32
+default_envs = esp32
description = HUB75 ESP32 I2S DMA test patterns example
;src_dir = src
[env]
-framework = arduino
platform = espressif32
board = wemos_d1_mini32
lib_deps =
fastled/FastLED
+ Wire
+ adafruit/Adafruit BusIO
+ adafruit/Adafruit GFX Library
https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA.git
-build_flags =
upload_speed = 460800
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
[env:esp32]
-build_flags =
- ${env.build_flags}
- -DTEST_FASTLINES
-lib_deps =
- ${env.lib_deps}
- Wire
- adafruit/Adafruit BusIO
- adafruit/Adafruit GFX Library
-
-[env:debug]
-build_flags =
- ${env.build_flags}
- -DTEST_FASTLINES
- -DSERIAL_DEBUG
-lib_deps =
- ${env.lib_deps}
- Wire
- adafruit/Adafruit BusIO
- adafruit/Adafruit GFX Library
-
-; build without GFX functions
-[env:minimal]
-build_flags =
- ${env.build_flags}
- -DNO_GFX
- -DNO_FAST_FUNCTIONS
- -DNO_CIE1931
-lib_deps =
- ${env.lib_deps}
-
-; Virtual Panel test
-[env:vpane]
-build_flags =
- ${env.build_flags}
- -DNO_FAST_FUNCTIONS
- -DVIRTUAL_PANE
-lib_deps =
- ${env.lib_deps}
- Wire
- adafruit/Adafruit BusIO
- adafruit/Adafruit GFX Library
-
-; Virtual Panel test
-[env:vpane_minimal]
-build_flags =
- ${env.build_flags}
- -DVIRTUAL_PANE
- -DNO_GFX
- -DNO_FAST_FUNCTIONS
- -DNO_CIE1931
-lib_deps =
- ${env.lib_deps}
- Wire
- adafruit/Adafruit BusIO
- adafruit/Adafruit GFX Library
+framework = arduino
-; PIO CI can't handle IDF git modules properly (yet)
-;[env:idfarduino]
-;platform = espressif32
-;platform_packages =
-; ; use a special branch
-; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.4
-;framework = arduino, espidf
-;build_flags =
-; ${env.build_flags}
-; -DARDUINO=200
-; -DESP32
-; ;-DUSE_FASTLINES
-; -DNO_GFX
-;lib_deps =
-; ${env.lib_deps}
-; https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA.git
+[env:esp32idf]
+framework = arduino, espidf
diff --git a/examples/PIO_TestPatterns/sdkconfig.defaults b/examples/PIO_TestPatterns/sdkconfig.defaults
index 909461e..ee16cd3 100644
--- a/examples/PIO_TestPatterns/sdkconfig.defaults
+++ b/examples/PIO_TestPatterns/sdkconfig.defaults
@@ -15,4 +15,5 @@ CONFIG_ARDUHAL_PARTITION_SCHEME="default"
CONFIG_AUTOCONNECT_WIFI=y
CONFIG_ARDUINO_SELECTIVE_WiFi=y
CONFIG_MBEDTLS_PSK_MODES=y
-CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y \ No newline at end of file
+CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
+CONFIG_FREERTOS_HZ=1000 \ No newline at end of file
diff --git a/examples/PIO_TestPatterns/src/main.cpp b/examples/PIO_TestPatterns/src/main.cpp
index 6325b63..40d077e 100644
--- a/examples/PIO_TestPatterns/src/main.cpp
+++ b/examples/PIO_TestPatterns/src/main.cpp
@@ -1,14 +1,14 @@
// How to use this library with a FM6126 panel, thanks goes to:
// https://github.com/hzeller/rpi-rgb-led-matrix/issues/746
-/*
-// IDF
+#ifdef IDF_BUILD
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <driver/gpio.h>
#include "sdkconfig.h"
-*/
+#endif
+
#include <Arduino.h>
#include "xtensa/core-macros.h"
#ifdef VIRTUAL_PANE
@@ -241,7 +241,7 @@ void loop(){
delay(PATTERN_DELAY);
//
-#ifdef TEST_FASTLINES
+#ifndef NO_FAST_FUNCTIONS
// Fillrate for fillRect() function
Serial.print("Estimating fullscreen fillrate with fillRect() time: ");
t1 = micros();
@@ -293,7 +293,7 @@ void loop(){
Serial.printf("%lu us, %u ticks\n", t2, ccount1);
delay(PATTERN_DELAY);
-#ifdef TEST_FASTLINES
+#ifndef NO_FAST_FUNCTIONS
Serial.println("Estimating V-lines with vlineDMA(): "); //
matrix->fillScreen(0);
color2 = random8();
@@ -347,7 +347,7 @@ void loop(){
Serial.printf("%lu us, %u ticks\n", t2, ccount1);
delay(PATTERN_DELAY);
-#ifdef TEST_FASTLINES
+#ifndef NO_FAST_FUNCTIONS
Serial.println("Estimating H-lines with hlineDMA(): ");
matrix->fillScreen(0);
color2 = random8();