mirror of
https://github.com/espressif/arduino-esp32
synced 2024-09-21 10:28:04 +00:00
99e68a0518
* 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 <32426024+lucasssvaz@users.noreply.github.com> * 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 <32426024+lucasssvaz@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
41 lines
1005 B
C
41 lines
1005 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
|
|
|
|
#ifndef RGB_BUILTIN_LED_COLOR_ORDER
|
|
#define RGB_BUILTIN_LED_COLOR_ORDER LED_COLOR_ORDER_GRB // default WS2812B color order
|
|
#endif
|
|
|
|
typedef enum {
|
|
LED_COLOR_ORDER_RGB,
|
|
LED_COLOR_ORDER_BGR,
|
|
LED_COLOR_ORDER_BRG,
|
|
LED_COLOR_ORDER_RBG,
|
|
LED_COLOR_ORDER_GBR,
|
|
LED_COLOR_ORDER_GRB
|
|
} rgb_led_color_order_t;
|
|
|
|
void rgbLedWriteOrdered(uint8_t pin, rgb_led_color_order_t order, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
|
|
|
|
// Will use RGB_BUILTIN_LED_COLOR_ORDER
|
|
void rgbLedWrite(uint8_t pin, uint8_t red_val, uint8_t green_val, uint8_t blue_val);
|
|
|
|
// Backward compatibility - Deprecated. It will be removed in future releases.
|
|
[[deprecated("Use rgbLedWrite() instead.")]]
|
|
void neopixelWrite(uint8_t p, uint8_t r, uint8_t g, uint8_t b);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* MAIN_ESP32_HAL_RGB_LED_H_ */
|