fix color control
This commit is contained in:
1 parent
57cd6778a6
commit
55737647a1
2 files changed
+70
-60
No files matched your search
+16
-1
@@ -2,9 +2,11 @@
|
||||
#define _LED_H
|
||||
|
||||
#ifdef HAS_RGB_LED
|
||||
#define FASTLED_INTERNAL
|
||||
#include <FastLED.h>
|
||||
#include "libpax_helpers.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAS_LORA
|
||||
#include "lorawan.h"
|
||||
#endif
|
||||
@@ -14,10 +16,23 @@
|
||||
#endif
|
||||
|
||||
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