mirror of
https://github.com/espressif/arduino-esp32
synced 2024-09-21 18:38:17 +00:00
05ae83a051
* Improve RGB LED Driver Replaces the use of the `LED_BUILTIN` variable by creating a new variable called `RGB_BUILTIN`. On boards with both a regular LED and RGB LED, this change provides functionality to control either LED. The `LED_BRIGHTNESS` variable is changed to `RGB_BRIGHTNESS`, which aligns more closely with the `RGB_BUILTIN` variable name. `BOARD_HAS_NEOPIXEL` is no longer necessary; it is replaced by `RGB_BUILTIN`. * Update BlinkRGB example Update example code for changes with the RGB driver: - Replace `LED_BUILTIN` and `BOARD_HAS_NEOPIXEL` with `RGB_BUILTIN` - Replace `LED_BRIGHTNESS` with `RGB_BRIGHTNESS` * Update board variants Update board variants for changes with the RGB driver: - Remove `BOARD_HAS_NEOPIXEL` - Define `RGB_BUILTIN` pin - Replace `LED_BRIGHTNESS` with `RGB_BRIGHTNESS` to align with `RGB_BUILTIN` name Co-authored-by: Rodrigo Garcia <rodrigo.garcia@espressif.com> Co-authored-by: Vojtěch Bartoška <76958047+VojtechBartoska@users.noreply.github.com>
20 lines
347 B
C
20 lines
347 B
C
#ifndef MAIN_ESP32_HAL_RGB_LED_H_
|
|
#define MAIN_ESP32_HAL_RGB_LED_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "esp32-hal.h"
|
|
|
|
#ifndef RGB_BRIGHTNESS
|
|
#define RGB_BRIGHTNESS 64
|
|
#endif
|
|
|
|
void neopixelWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* MAIN_ESP32_HAL_RGB_LED_H_ */ |