Arduino core 3.2.1

This commit is contained in:
Jason2866
2025-07-03 17:12:25 +02:00
parent da5cb384a5
commit 9bf8b3f10a
76 changed files with 493576 additions and 1697 deletions
@@ -14,61 +14,61 @@
#include <Arduino.h>
#define MAX_HUE 360
#define MAX_HUE 360
#define MAX_SATURATION 255
#define MAX_BRIGHTNESS 255
#define MAX_PROGRESS 256
#define MAX_PROGRESS 256
typedef struct {
union {
struct {
uint32_t v: 8; /*!< Brightness/Value of the LED. 0-255 */
uint32_t s: 8; /*!< Saturation of the LED. 0-255 */
uint32_t h: 9; /*!< Hue of the LED. 0-360 */
};
uint32_t value; /*!< IHSV value of the LED. */
union {
struct {
uint32_t v : 8; /*!< Brightness/Value of the LED. 0-255 */
uint32_t s : 8; /*!< Saturation of the LED. 0-255 */
uint32_t h : 9; /*!< Hue of the LED. 0-360 */
};
uint32_t value; /*!< IHSV value of the LED. */
};
} led_indicator_color_hsv_t;
typedef struct {
union {
struct {
uint32_t r: 8; /*!< Red component of the LED color. Range: 0-255. */
uint32_t g: 8; /*!< Green component of the LED color. Range: 0-255. */
uint32_t b: 8; /*!< Blue component of the LED color. Range: 0-255. */
};
uint32_t value; /*!< Combined RGB value of the LED color. */
union {
struct {
uint32_t r : 8; /*!< Red component of the LED color. Range: 0-255. */
uint32_t g : 8; /*!< Green component of the LED color. Range: 0-255. */
uint32_t b : 8; /*!< Blue component of the LED color. Range: 0-255. */
};
uint32_t value; /*!< Combined RGB value of the LED color. */
};
} led_indicator_color_rgb_t;
class BuiltInLED {
private:
uint8_t pin_number;
bool state;
led_indicator_color_hsv_t hsv_color;
uint8_t pin_number;
bool state;
led_indicator_color_hsv_t hsv_color;
public:
BuiltInLED();
~BuiltInLED();
BuiltInLED();
~BuiltInLED();
static led_indicator_color_hsv_t rgb2hsv(led_indicator_color_rgb_t rgb_value);
static led_indicator_color_rgb_t hsv2rgb(led_indicator_color_hsv_t hsv);
static led_indicator_color_hsv_t rgb2hsv(led_indicator_color_rgb_t rgb_value);
static led_indicator_color_rgb_t hsv2rgb(led_indicator_color_hsv_t hsv);
void begin(uint8_t pin);
void end();
void begin(uint8_t pin);
void end();
void on();
void off();
void toggle();
bool getState();
void on();
void off();
void toggle();
bool getState();
bool write();
bool write();
void setBrightness(uint8_t brightness);
uint8_t getBrightness();
void setHSV(led_indicator_color_hsv_t hsv);
led_indicator_color_hsv_t getHSV();
void setRGB(led_indicator_color_rgb_t color);
led_indicator_color_rgb_t getRGB();
void setTemperature(uint32_t temperature);
};
void setBrightness(uint8_t brightness);
uint8_t getBrightness();
void setHSV(led_indicator_color_hsv_t hsv);
led_indicator_color_hsv_t getHSV();
void setRGB(led_indicator_color_rgb_t color);
led_indicator_color_rgb_t getRGB();
void setTemperature(uint32_t temperature);
};