libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
rgb_led.h
Go to the documentation of this file.
1#pragma once
2#ifndef DSY_RGB_LED_H
3#define DSY_RGB_LED_H
4#include "hid/led.h"
5#include "util/color.h"
6
7namespace daisy
8{
14class RgbLed
15{
16 public:
17 RgbLed() {}
19
26 void Init(Pin red, Pin green, Pin blue, bool invert);
27
33 void Set(float r, float g, float b);
34
38 void SetRed(float val);
39
43 void SetGreen(float val);
44
48 void SetBlue(float val);
49
54
58 void Update();
59
60 private:
61 Led r_, g_, b_;
62};
64} // namespace daisy
65
66#endif
Definition color.h:24
Definition leddriver.h:33
LED Class providing simple Software PWM ability, etc Eventually this will work with hardware PWM,...
Definition led.h:22
Definition rgb_led.h:15
void Init(Pin red, Pin green, Pin blue, bool invert)
void Set(float r, float g, float b)
void SetBlue(float val)
~RgbLed()
Definition rgb_led.h:18
void SetRed(float val)
RgbLed()
Definition rgb_led.h:17
void SetGreen(float val)
void SetColor(Color c)
Hardware defines and helpers for daisy field platform.
Definition index.h:2
representation of hardware port/pin combination
Definition daisy_core.h:193