From 644ef14ba8ebf407e1bd877b237d9023759d7f44 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 2 Oct 2024 01:04:09 +0300 Subject: [PATCH] NEOPIXEL_INVERT_RG --- ports/espressif/boards/waveshare_esp32_s3_zero/board.h | 3 +++ src/main.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/ports/espressif/boards/waveshare_esp32_s3_zero/board.h b/ports/espressif/boards/waveshare_esp32_s3_zero/board.h index 589b7b1f..d104d6c2 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_zero/board.h +++ b/ports/espressif/boards/waveshare_esp32_s3_zero/board.h @@ -51,6 +51,9 @@ // Number of neopixels #define NEOPIXEL_NUMBER 1 +// Invert Neopixel red and green +#define NEOPIXEL_INVERT_RG 1 + // LED for indicator and writing flash // If not defined neopixel will be use for flash writing instead diff --git a/src/main.c b/src/main.c index cd8255fb..c2dadff1 100644 --- a/src/main.c +++ b/src/main.c @@ -37,10 +37,17 @@ //--------------------------------------------------------------------+ //#define USE_DFU_BUTTON 1 +#ifndef NEOPIXEL_INVERT_RG uint8_t RGB_USB_UNMOUNTED[] = { 0xff, 0x00, 0x00 }; // Red uint8_t RGB_USB_MOUNTED[] = { 0x00, 0xff, 0x00 }; // Green uint8_t RGB_WRITING[] = { 0xcc, 0x66, 0x00 }; uint8_t RGB_DOUBLE_TAP[] = { 0x80, 0x00, 0xff }; // Purple +#else +uint8_t RGB_USB_UNMOUNTED[] = { 0x00, 0xff, 0x00 }; // Red +uint8_t RGB_USB_MOUNTED[] = { 0xff, 0x00, 0x00 }; // Green +uint8_t RGB_WRITING[] = { 0x66, 0xcc, 0x00 }; +uint8_t RGB_DOUBLE_TAP[] = { 0x00, 0x80, 0xff }; // Purple +#endif uint8_t RGB_UNKNOWN[] = { 0x00, 0x00, 0x88 }; // for debug uint8_t RGB_OFF[] = { 0x00, 0x00, 0x00 };