fix led color control
This commit is contained in:
1 parent
c55b7e8709
commit
681118c2ec
2 files changed
+65
-73
No files matched your search
+14
-1
@@ -2,6 +2,7 @@
|
||||
#define _LED_H
|
||||
|
||||
#ifdef HAS_RGB_LED
|
||||
#define FASTLED_INTERNAL
|
||||
#include <FastLED.h>
|
||||
#include "libpax_helpers.h"
|
||||
#endif
|
||||
@@ -16,10 +17,22 @@
|
||||
|
||||
enum led_states { LED_OFF, LED_ON };
|
||||
|
||||
enum colors {
|
||||
COLOR_WHITE = 0xFFFFFF,
|
||||
COLOR_NONE = 0x000000,
|
||||
COLOR_CYAN = 0x00FFFF,
|
||||
COLOR_BLUE = 0x0000FF,
|
||||
COLOR_GREEN = 0x008000,
|
||||
COLOR_YELLOW = 0xFFFF00,
|
||||
COLOR_ORANGE = 0xFFA500,
|
||||
COLOR_RED = 0xFF0000,
|
||||
COLOR_PINK = 0xFFC0CB
|
||||
};
|
||||
|
||||
extern TaskHandle_t ledLoopTask;
|
||||
|
||||
void rgb_led_init(void);
|
||||
void led_sethue(uint8_t hue);
|
||||
void rgb_set_color(uint32_t color);
|
||||
void ledLoop(void *parameter);
|
||||
void switch_LED(led_states state);
|
||||
void switch_LED1(led_states state);
|
||||
|
||||
Reference in new issue
Block a user