From ff3e5ba60478116f7964b873b8bac1b75581cd59 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Tue, 30 Apr 2024 19:42:35 +0200 Subject: [PATCH] moved neopixels configuration to esp32.h; note: make sure not to use the psram spi pins! --- ESP32/console_esp32.cpp | 5 ++--- ESP32/esp32.h | 4 +++- ESP32/main.ino | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ESP32/console_esp32.cpp b/ESP32/console_esp32.cpp index 5cd328d..1d99941 100644 --- a/ESP32/console_esp32.cpp +++ b/ESP32/console_esp32.cpp @@ -7,12 +7,11 @@ #include "console_esp32.h" #include "cpu.h" +#include "esp32.h" #include "error.h" #include "utils.h" -#define NEOPIXELS_PIN 25 - console_esp32::console_esp32(std::atomic_uint32_t *const stop_event, std::vector & io_ports, const int t_width, const int t_height) : console(stop_event, t_width, t_height), io_ports(io_ports) @@ -62,7 +61,7 @@ void console_esp32::refresh_virtual_terminal() void console_esp32::panel_update_thread() { -#if !defined(BUILD_FOR_RP2040) +#if !defined(BUILD_FOR_RP2040) && defined(NEOPIXELS_PIN) Serial.println(F("panel task started")); cpu *const c = b->getCpu(); diff --git a/ESP32/esp32.h b/ESP32/esp32.h index d86ddca..08ee59e 100644 --- a/ESP32/esp32.h +++ b/ESP32/esp32.h @@ -1,4 +1,4 @@ -// (C) 2018-2023 by Folkert van Heusden +// (C) 2018-2024 by Folkert van Heusden // Released under MIT license #pragma once @@ -12,3 +12,5 @@ #define SD_FAT_TYPE 1 #include #endif + +// #define NEOPIXELS_PIN 24 diff --git a/ESP32/main.ino b/ESP32/main.ino index b70f523..395dc84 100644 --- a/ESP32/main.ino +++ b/ESP32/main.ino @@ -323,7 +323,6 @@ void setup() { rl02_dev->begin(); b->add_rl02(rl02_dev); - Serial.println(F("Init TTY")); tty_ = new tty(cnsl, b); Serial.println(F("Connect TTY to bus"));