Skip to content

Commit 99e68a0

Browse files
SuGliderlucasssvazpre-commit-ci-lite[bot]
authored
Change "neopixel" references to use RGB LED naming (#10225)
* fix(rgbled): fixes core rgbledWrite() * fix(rgbled): fixes examples - rgbledWrite() * fix(rgbled): fixes variants commetaries - rgbledWrite() * fix(rgbled): examples and doc - use RGB_LED naming * fix(rgbled): variants - use RGB_LED naming * fix(rgbled): other places for RGB LED naming * fix(typo): cores - rgbLed instead of rgbled * fix(typo): examples - rgbLed instead of rgbled * fix(typo): variants commentaties - rgbLed instead of rgbled * fix(rgbled): bad file name * fix(typo): typo and commentaries Co-authored-by: Lucas Saavedra Vaz <[email protected]> * fix(rgbled): deprecating neopixelWrite() * fix(rgbled): use RGB LED naming * fix(rgbled): document formatting * fix(rgbled): neopixelWrite() is now deprecated * fix(rgbled): removed attribute in wrong place * just a git push test * restart git bash test * ci(pre-commit): Apply automatic fixes * removed wrong test file * fix(rgbled): new Arduino style depreacted attribute --------- Co-authored-by: Lucas Saavedra Vaz <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 0539ebf commit 99e68a0

File tree

74 files changed

+176
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+176
-169
lines changed

Diff for: cores/esp32/esp32-hal-gpio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val) {
166166
//use RMT to set all channels on/off
167167
RGB_BUILTIN_storage = val;
168168
const uint8_t comm_val = val != 0 ? RGB_BRIGHTNESS : 0;
169-
neopixelWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
169+
rgbLedWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
170170
return;
171171
}
172172
#endif // RGB_BUILTIN

Diff for: cores/esp32/esp32-hal-rgb-led.c

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
#include "esp32-hal-rgb-led.h"
1818

19+
// Backward compatibility - Deprecated. It will be removed in future releases.
20+
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
21+
log_w("neopixelWrite() is deprecated. Use rgbLedWrite().");
22+
rgbLedWrite(pin, red_val, green_val, blue_val);
23+
}
24+
1925
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
2026
rgbLedWriteOrdered(pin, RGB_BUILTIN_LED_COLOR_ORDER, red_val, green_val, blue_val);
2127
}

Diff for: cores/esp32/esp32-hal-rgb-led.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ void rgbLedWriteOrdered(uint8_t pin, rgb_led_color_order_t order, uint8_t red_va
2929
// Will use RGB_BUILTIN_LED_COLOR_ORDER
3030
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
3131

32-
// Backward compatibility
33-
#define neopixelWrite(p, r, g, b) rgbLedWrite(p, r, g, b)
32+
// Backward compatibility - Deprecated. It will be removed in future releases.
33+
[[deprecated("Use rgbLedWrite() instead.")]]
34+
void neopixelWrite(uint8_t p, uint8_t r, uint8_t g, uint8_t b);
3435

3536
#ifdef __cplusplus
3637
}

Diff for: cores/esp32/io_pin_remap.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int8_t gpioNumberToDigitalPin(int8_t gpioNumber);
7777
#define pinMatrixOutDetach(pin, invertOut, invertEnable) pinMatrixOutDetach(digitalPinToGPIONumber(pin), invertOut, invertEnable)
7878

7979
// cores/esp32/esp32-hal-rgb-led.h
80-
#define neopixelWrite(pin, red_val, green_val, blue_val) neopixelWrite(digitalPinToGPIONumber(pin), red_val, green_val, blue_val)
80+
#define rgbLedWrite(pin, red_val, green_val, blue_val) rgbLedWrite(digitalPinToGPIONumber(pin), red_val, green_val, blue_val)
8181

8282
// cores/esp32/esp32-hal-rmt.h
8383
#define rmtInit(pin, channel_direction, memsize, frequency_Hz) rmtInit(digitalPinToGPIONumber(pin), channel_direction, memsize, frequency_Hz)

Diff for: docs/en/api/rmt.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Example
1414

1515
To get started with RMT, you can try:
1616

17-
RMT Write Neo Pixel
18-
*******************
17+
RMT Write RGB LED
18+
*****************
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

Diff for: libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Calling digitalWrite(RGB_BUILTIN, HIGH) will use hidden RGB driver.
77
88
RGBLedWrite demonstrates control of each channel:
9-
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
9+
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
1010
1111
WARNING: After using digitalWrite to drive RGB LED it will be impossible to drive the same pin
1212
with normal HIGH/LOW level
@@ -27,13 +27,13 @@ void loop() {
2727
digitalWrite(RGB_BUILTIN, LOW); // Turn the RGB LED off
2828
delay(1000);
2929

30-
neopixelWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
30+
rgbLedWrite(RGB_BUILTIN, RGB_BRIGHTNESS, 0, 0); // Red
3131
delay(1000);
32-
neopixelWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
32+
rgbLedWrite(RGB_BUILTIN, 0, RGB_BRIGHTNESS, 0); // Green
3333
delay(1000);
34-
neopixelWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
34+
rgbLedWrite(RGB_BUILTIN, 0, 0, RGB_BRIGHTNESS); // Blue
3535
delay(1000);
36-
neopixelWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
36+
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Off / black
3737
delay(1000);
3838
#endif
3939
}

Diff for: libraries/ESP32/examples/RMT/Legacy_RMT_Driver_Compatible/Legacy_RMT_Driver_Compatible.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#else
1818

1919
// add the file "build_opt.h" to your Arduino project folder with "-DESP32_ARDUINO_NO_RGB_BUILTIN" to use the RMT Legacy driver
20-
// neoPixelWrite() is a function that writes to the RGB LED and it won't be available here
20+
// rgbLedWrite() is a function that writes to the RGB LED and it won't be available here
2121
#include "driver/rmt.h"
2222

2323
bool installed = false;

Diff for: libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino renamed to libraries/ESP32/examples/RMT/RMTWrite_RGB_LED/RMTWrite_RGB_LED.ino

+5-5
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
//

Diff for: libraries/ESP32/examples/RMT/RMT_CPUFreq_Test/RMT_CPUFreq_Test.ino

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* that RMT works on any CPU/APB Frequency.
1818
*
1919
* It uses an ESP32 Arduino builtin RGB NeoLED function based on RMT:
20-
* void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
20+
* void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val)
2121
*
2222
* The output is a visual WS2812 RGB LED color change routine using each time a
2323
* different CPU Frequency, just to illustrate how it works. Serial output indicates
@@ -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
@@ -65,22 +65,22 @@ void loop() {
6565
Serial.updateBaudRate(115200);
6666
Serial.printf("\n--changed CPU Frequency to %lu MHz\n", getCpuFrequencyMhz());
6767

68-
neopixelWrite(RGB_LED_GPIO, BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); // White
68+
rgbLedWrite(RGB_LED_GPIO, BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); // White
6969
Serial.println("White");
7070
delay(1000);
71-
neopixelWrite(RGB_LED_GPIO, 0, 0, 0); // Off
71+
rgbLedWrite(RGB_LED_GPIO, 0, 0, 0); // Off
7272
Serial.println("Off");
7373
delay(1000);
74-
neopixelWrite(RGB_LED_GPIO, BRIGHTNESS, 0, 0); // Red
74+
rgbLedWrite(RGB_LED_GPIO, BRIGHTNESS, 0, 0); // Red
7575
Serial.println("Red");
7676
delay(1000);
77-
neopixelWrite(RGB_LED_GPIO, 0, BRIGHTNESS, 0); // Green
77+
rgbLedWrite(RGB_LED_GPIO, 0, BRIGHTNESS, 0); // Green
7878
Serial.println("Green");
7979
delay(1000);
80-
neopixelWrite(RGB_LED_GPIO, 0, 0, BRIGHTNESS); // Blue
80+
rgbLedWrite(RGB_LED_GPIO, 0, 0, BRIGHTNESS); // Blue
8181
Serial.println("Blue");
8282
delay(1000);
83-
neopixelWrite(RGB_LED_GPIO, 0, 0, 0); // Off
83+
rgbLedWrite(RGB_LED_GPIO, 0, 0, 0); // Off
8484
Serial.println("Off");
8585
delay(1000);
8686
}

Diff for: libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Currently, this example supports the following targets.
2020
### Configure the Project
2121

2222
Set the LED GPIO by changing the `LED_PIN` definition. By default, the LED_PIN is `RGB_BUILTIN`.
23-
By default, the `neoPixelWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
23+
By default, the `rgbLedWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
2424

2525
#### Using Arduino IDE
2626

Diff for: libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static esp_err_t zb_attribute_handler(const esp_zb_zcl_set_attr_value_message_t
155155
if (message->attribute.id == ESP_ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID && message->attribute.data.type == ESP_ZB_ZCL_ATTR_TYPE_BOOL) {
156156
light_state = message->attribute.data.value ? *(bool *)message->attribute.data.value : light_state;
157157
log_i("Light sets to %s", light_state ? "On" : "Off");
158-
neopixelWrite(LED_PIN, 255 * light_state, 255 * light_state, 255 * light_state); // Toggle light
158+
rgbLedWrite(LED_PIN, 255 * light_state, 255 * light_state, 255 * light_state); // Toggle light
159159
}
160160
}
161161
}
@@ -172,7 +172,7 @@ void setup() {
172172
ESP_ERROR_CHECK(esp_zb_platform_config(&config));
173173

174174
// Init RMT and leave light OFF
175-
neopixelWrite(LED_PIN, 0, 0, 0);
175+
rgbLedWrite(LED_PIN, 0, 0, 0);
176176

177177
// Start Zigbee task
178178
xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);

Diff for: libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino

+9-9
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
5555
}
5656
if (i != nCmds1) {
5757
log_e("Sorry, OpenThread Network setup failed!");
58-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
58+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
5959
return false;
6060
}
6161
Serial.println("OpenThread started.\r\nWaiting for activating correct Device Role.");
@@ -69,7 +69,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
6969
Serial.println();
7070
if (!tries) {
7171
log_e("Sorry, Device Role failed by timeout! Current Role: %s.", otGetStringDeviceRole());
72-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
72+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
7373
return false;
7474
}
7575
Serial.printf("Device is %s.\r\n", otGetStringDeviceRole());
@@ -80,12 +80,12 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
8080
}
8181
if (i != nCmds2) {
8282
log_e("Sorry, OpenThread CoAP setup failed!");
83-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
83+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
8484
return false;
8585
}
8686
Serial.println("OpenThread setup done. Node is ready.");
8787
// all fine! LED goes Green
88-
neopixelWrite(RGB_BUILTIN, 0, 64, 8); // GREEN ... Lamp is ready!
88+
rgbLedWrite(RGB_BUILTIN, 0, 64, 8); // GREEN ... Lamp is ready!
8989
return true;
9090
}
9191

@@ -118,16 +118,16 @@ void otCOAPListen() {
118118
log_i("CoAP PUT [%s]\r\n", payload == '0' ? "OFF" : "ON");
119119
if (payload == '0') {
120120
for (int16_t c = 248; c > 16; c -= 8) {
121-
neopixelWrite(RGB_BUILTIN, c, c, c); // ramp down
121+
rgbLedWrite(RGB_BUILTIN, c, c, c); // ramp down
122122
delay(5);
123123
}
124-
neopixelWrite(RGB_BUILTIN, 0, 0, 0); // Lamp Off
124+
rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // Lamp Off
125125
} else {
126126
for (int16_t c = 16; c < 248; c += 8) {
127-
neopixelWrite(RGB_BUILTIN, c, c, c); // ramp up
127+
rgbLedWrite(RGB_BUILTIN, c, c, c); // ramp up
128128
delay(5);
129129
}
130-
neopixelWrite(RGB_BUILTIN, 255, 255, 255); // Lamp On
130+
rgbLedWrite(RGB_BUILTIN, 255, 255, 255); // Lamp On
131131
}
132132
}
133133
}
@@ -136,7 +136,7 @@ void otCOAPListen() {
136136
void setup() {
137137
Serial.begin(115200);
138138
// LED starts RED, indicating not connected to Thread network.
139-
neopixelWrite(RGB_BUILTIN, 64, 0, 0);
139+
rgbLedWrite(RGB_BUILTIN, 64, 0, 0);
140140
OThreadCLI.begin(false); // No AutoStart is necessary
141141
OThreadCLI.setTimeout(250); // waits 250ms for the OpenThread CLI response
142142
setupNode();

Diff for: libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bool otDeviceSetup(
4949
}
5050
if (i != nCmds1) {
5151
log_e("Sorry, OpenThread Network setup failed!");
52-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
52+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
5353
return false;
5454
}
5555
Serial.println("OpenThread started.\r\nWaiting for activating correct Device Role.");
@@ -63,7 +63,7 @@ bool otDeviceSetup(
6363
Serial.println();
6464
if (!tries) {
6565
log_e("Sorry, Device Role failed by timeout! Current Role: %s.", otGetStringDeviceRole());
66-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
66+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
6767
return false;
6868
}
6969
Serial.printf("Device is %s.\r\n", otGetStringDeviceRole());
@@ -74,12 +74,12 @@ bool otDeviceSetup(
7474
}
7575
if (i != nCmds2) {
7676
log_e("Sorry, OpenThread CoAP setup failed!");
77-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
77+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... failed!
7878
return false;
7979
}
8080
Serial.println("OpenThread setup done. Node is ready.");
8181
// all fine! LED goes and stays Blue
82-
neopixelWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
82+
rgbLedWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
8383
return true;
8484
}
8585

@@ -149,7 +149,7 @@ void checkUserButton() {
149149
lastLampState = !lastLampState;
150150
if (!otCoapPUT(lastLampState)) { // failed: Lamp Node is not responding due to be off or unreachable
151151
// timeout from the CoAP PUT message... restart the node.
152-
neopixelWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
152+
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
153153
Serial.println("Reseting the Node as Switch... wait.");
154154
// start over...
155155
setupNode();
@@ -161,7 +161,7 @@ void checkUserButton() {
161161
void setup() {
162162
Serial.begin(115200);
163163
// LED starts RED, indicating not connected to Thread network.
164-
neopixelWrite(RGB_BUILTIN, 64, 0, 0);
164+
rgbLedWrite(RGB_BUILTIN, 64, 0, 0);
165165
OThreadCLI.begin(false); // No AutoStart is necessary
166166
OThreadCLI.setTimeout(250); // waits 250ms for the OpenThread CLI response
167167
setupNode();

Diff for: variants/Bee_Data_Logger/pins_arduino.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ static const uint8_t LDO2 = 34;
6565
static const uint8_t RGB_DATA = 40;
6666
static const uint8_t RGB_PWR = 34;
6767

68-
#define PIN_NEOPIXEL RGB_DATA
68+
#define PIN_RGB_LED RGB_DATA
6969
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
70-
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
70+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
7171
#define BUILTIN_LED LED_BUILTIN // backward compatibility
7272
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
73-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
73+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
7474
#define RGB_BUILTIN LED_BUILTIN
7575
#define RGB_BRIGHTNESS 64
7676

Diff for: variants/Bee_Motion_S3/pins_arduino.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ static const uint8_t LDO2 = 34;
7373
static const uint8_t RGB_DATA = 40;
7474
static const uint8_t RGB_PWR = 34;
7575

76-
#define PIN_NEOPIXEL RGB_DATA
76+
#define PIN_RGB_LED RGB_DATA
7777
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
78-
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
78+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
7979
#define BUILTIN_LED LED_BUILTIN // backward compatibility
8080
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
81-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
81+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
8282
#define RGB_BUILTIN LED_BUILTIN
8383
#define RGB_BRIGHTNESS 64
8484

Diff for: variants/Bee_S3/pins_arduino.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ static const uint8_t VBAT_VOLTAGE = 1;
6262
static const uint8_t RGB_DATA = 48;
6363
static const uint8_t RGB_PWR = 34;
6464

65-
#define PIN_NEOPIXEL RGB_DATA
65+
#define PIN_RGB_LED RGB_DATA
6666
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
67-
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL;
67+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
6868
#define BUILTIN_LED LED_BUILTIN // backward compatibility
6969
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
70-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
70+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite
7171
#define RGB_BUILTIN LED_BUILTIN
7272
#define RGB_BRIGHTNESS 64
7373

Diff for: variants/adafruit_camera_esp32s3/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static const uint8_t NEOPIXEL_PIN = 1;
1818
static const uint8_t LED_BUILTIN = PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT;
1919
#define BUILTIN_LED LED_BUILTIN // backward compatibility
2020
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
21-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
21+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
2222
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
2323
#define RGB_BRIGHTNESS 64
2424

Diff for: variants/adafruit_feather_esp32_v2/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static const uint8_t LED_BUILTIN = 13;
4646

4747
// Neopixel
4848
#define PIN_NEOPIXEL 0
49-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
49+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
5050
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
5151
#define RGB_BRIGHTNESS 64
5252

Diff for: variants/adafruit_feather_esp32c6/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
static const uint8_t LED_BUILTIN = 15;
1010
#define BUILTIN_LED LED_BUILTIN // backward compatibility
1111
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
12-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
12+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
1313
#define RGB_BUILTIN (SOC_GPIO_PIN_COUNT + PIN_NEOPIXEL)
1414
#define RGB_BRIGHTNESS 64
1515

Diff for: variants/adafruit_feather_esp32s2/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
// Neopixel
1818
#define PIN_NEOPIXEL 33
19-
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() and digitalWrite() for blinking
19+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
2020
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
2121
#define RGB_BRIGHTNESS 64
2222

0 commit comments

Comments
 (0)