sdcard & rgbled fixes
This commit is contained in:
1 parent
ef68179b85
commit
8bb2c75338
15 files changed
+210
-288
No files matched your search
@@ -5,7 +5,9 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
// Time functions
|
||||
#ifdef HAS_RTC
|
||||
#include <RtcDateTime.h>
|
||||
#endif
|
||||
#include <Ticker.h>
|
||||
|
||||
// std::set for unified array functions
|
||||
|
||||
+7
-32
@@ -1,8 +1,9 @@
|
||||
#ifndef _LED_H
|
||||
#define _LED_H
|
||||
|
||||
#ifdef RGB_LED_COUNT
|
||||
#include <SmartLeds.h>
|
||||
#ifdef HAS_RGB_LED
|
||||
#include <FastLED.h>
|
||||
#include "libpax_helpers.h"
|
||||
#endif
|
||||
#ifdef HAS_LORA
|
||||
#include "lorawan.h"
|
||||
@@ -12,39 +13,13 @@
|
||||
#define RGB_LED_COUNT 1
|
||||
#endif
|
||||
|
||||
// value for HSL color
|
||||
// see http://www.workwithcolor.com/blue-color-hue-range-01.htm
|
||||
#define COLOR_RED 0
|
||||
#define COLOR_ORANGE 30
|
||||
#define COLOR_ORANGE_YELLOW 45
|
||||
#define COLOR_YELLOW 60
|
||||
#define COLOR_YELLOW_GREEN 90
|
||||
#define COLOR_GREEN 120
|
||||
#define COLOR_GREEN_CYAN 165
|
||||
#define COLOR_CYAN 180
|
||||
#define COLOR_CYAN_BLUE 210
|
||||
#define COLOR_BLUE 240
|
||||
#define COLOR_BLUE_MAGENTA 275
|
||||
#define COLOR_MAGENTA 300
|
||||
#define COLOR_PINK 350
|
||||
#define COLOR_WHITE 360
|
||||
#define COLOR_NONE 999
|
||||
|
||||
struct RGBColor {
|
||||
uint8_t R;
|
||||
uint8_t G;
|
||||
uint8_t B;
|
||||
};
|
||||
|
||||
enum led_states { LED_OFF, LED_ON };
|
||||
|
||||
extern TaskHandle_t ledLoopTask;
|
||||
|
||||
// Exported Functions
|
||||
void rgb_set_color(uint16_t hue);
|
||||
void blink_LED(uint16_t set_color, uint16_t set_blinkduration);
|
||||
void rgb_led_init(void);
|
||||
void led_sethue(uint8_t hue);
|
||||
void ledLoop(void *parameter);
|
||||
void switch_LED(uint8_t state);
|
||||
void switch_LED1(uint8_t state);
|
||||
void switch_LED(led_states state);
|
||||
void switch_LED1(led_states state);
|
||||
|
||||
#endif
|
||||
@@ -33,6 +33,10 @@
|
||||
#elif HAS_SDCARD == 2 // MMC interface
|
||||
#include "driver/sdmmc_host.h"
|
||||
|
||||
#ifndef SDCARD_SLOTCONFIG
|
||||
#define SDCARD_SLOTCONFIG SDMMC_SLOT_CONFIG_DEFAULT()
|
||||
#endif
|
||||
|
||||
#ifndef SDCARD_SLOTWIDTH
|
||||
#define SDCARD_SLOTWIDTH 1
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user