Skip to content

Commit 8e37c99

Browse files
committed
fix(rgbled): examples and doc - use RGB_LED naming
1 parent c18b017 commit 8e37c99

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/en/api/rmt.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To get started with RMT, you can try:
1717
RMT Write Neo Pixel
1818
*******************
1919

20-
.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino
20+
.. literalinclude:: ../../../libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino
2121
:language: arduino
2222

2323

libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino renamed to libraries/ESP32/examples/RMT/RMTWrite_LED_RGB/RMTWrite_LED_RGB.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Espressif Systems (Shanghai) PTE LTD
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -20,17 +20,17 @@
2020
*/
2121

2222
// The effect seen in (Espressif devkits) ESP32C6, ESP32H2, ESP32C3, ESP32S2 and ESP32S3 is like a Blink of RGB LED
23-
#ifdef PIN_NEOPIXEL
24-
#define BUILTIN_RGBLED_PIN PIN_NEOPIXEL
23+
#ifdef PIN_LED_RGB
24+
#define BUILTIN_RGBLED_PIN PIN_LED_RGB
2525
#else
26-
#define BUILTIN_RGBLED_PIN 21 // ESP32 has no builtin RGB LED (PIN_NEOPIXEL)
26+
#define BUILTIN_RGBLED_PIN 21 // ESP32 has no builtin RGB LED (PIN_LED_RGB)
2727
#endif
2828

2929
#define NR_OF_LEDS 8 * 4
3030
#define NR_OF_ALL_BITS 24 * NR_OF_LEDS
3131

3232
//
33-
// Note: This example uses Neopixel LED board, 32 LEDs chained one
33+
// Note: This example uses a board with 32 WS2812b LEDs chained one
3434
// after another, each RGB LED has its 24 bit value
3535
// for color configuration (8b for each color)
3636
//

libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
// Default DevKit RGB LED GPIOs:
2828
// The effect seen in (Espressif devkits) ESP32C6, ESP32H2, ESP32C3, ESP32S2 and ESP32S3 is like a Blink of RGB LED
29-
#ifdef PIN_NEOPIXEL
30-
#define MY_LED_GPIO PIN_NEOPIXEL
29+
#ifdef PIN_RGB_LED
30+
#define MY_LED_GPIO PIN_RGB_LED
3131
#else
32-
#define MY_LED_GPIO 21 // ESP32 has no builtin RGB LED (PIN_NEOPIXEL)
32+
#define MY_LED_GPIO 21 // ESP32 has no builtin RGB LED (PIN_RGB_LED)
3333
#endif
3434

3535
// Set the correct GPIO to any necessary by changing RGB_LED_GPIO value

0 commit comments

Comments
 (0)