2018-07-17 15:15:58 +02:00
|
|
|
#ifndef _LED_H
|
|
|
|
#define _LED_H
|
2018-07-15 14:28:05 +02:00
|
|
|
|
2022-10-31 16:56:48 +01:00
|
|
|
#ifdef HAS_RGB_LED
|
2022-10-31 18:41:29 +01:00
|
|
|
#define FASTLED_INTERNAL
|
2022-10-31 16:56:48 +01:00
|
|
|
#include <FastLED.h>
|
|
|
|
#include "libpax_helpers.h"
|
2022-08-19 16:35:02 +02:00
|
|
|
#endif
|
2022-10-31 16:56:48 +01:00
|
|
|
|
2022-08-19 16:35:02 +02:00
|
|
|
#ifdef HAS_LORA
|
2020-03-29 18:08:52 +02:00
|
|
|
#include "lorawan.h"
|
2022-08-19 16:35:02 +02:00
|
|
|
#endif
|
2018-03-31 23:04:26 +02:00
|
|
|
|
2020-04-06 11:53:55 +02:00
|
|
|
#ifndef RGB_LED_COUNT
|
|
|
|
#define RGB_LED_COUNT 1
|
|
|
|
#endif
|
|
|
|
|
2018-07-15 14:28:05 +02:00
|
|
|
enum led_states { LED_OFF, LED_ON };
|
|
|
|
|
2022-10-31 18:41:29 +01:00
|
|
|
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
|
|
|
|
};
|
|
|
|
|
2018-10-03 23:07:22 +02:00
|
|
|
extern TaskHandle_t ledLoopTask;
|
|
|
|
|
2022-10-31 16:56:48 +01:00
|
|
|
void rgb_led_init(void);
|
2022-10-31 18:41:29 +01:00
|
|
|
void rgb_set_color(uint32_t color);
|
2018-10-03 00:25:05 +02:00
|
|
|
void ledLoop(void *parameter);
|
2022-10-31 16:56:48 +01:00
|
|
|
void switch_LED(led_states state);
|
|
|
|
void switch_LED1(led_states state);
|
2018-07-17 11:53:43 +02:00
|
|
|
|
|
|
|
#endif
|