arduino-esp32/cores/esp32/esp32-hal-rgb-led.h
Tomáš Pilný 097ff8b1f5
Implement simple RGB driver via digitalWrite; solving #6783 (#6808)
* Initial implementation of RGB driver via digitalWrite

* Moved constants to pins_arduino.h

* Changed pin definition + added example

* Wrapped BlinkRGB in #ifdef BOARD_HAS_NEOPIXEL

* Removed forgotten log from example

* Moved RGBLedWrite to new file esp32-hal-rgb-led and created pinMode in variatn.cpp

* Updated example - lowered single channel brightness to LED_BRIGHTNESS

* Changed function name from RGBLedWrite to neopixelWrite + code polishing

* Moved pinSetup portion related to RGB back to common file
2022-06-24 14:04:03 +03:00

20 lines
No EOL
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 LED_BRIGHTNESS
#define LED_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_ */