Firmware for an ad-hoc mesh network of Internet-of-Things devices based on LoRa (Long Range radio) that can be deployed quickly and cheaply.
DuckLed.h
Go to the documentation of this file.
1 
10 #ifndef DUCKLED_H_
11 #define DUCKLED_H_
12 
13 #include "cdpcfg.h"
14 
15 #include <Arduino.h>
16 
24 class DuckLed {
25 public:
31  static DuckLed* getInstance();
32 
40  void setColor(int ledR = CDPCFG_PIN_RGBLED_R, int ledG = CDPCFG_PIN_RGBLED_G,
41  int ledB = CDPCFG_PIN_RGBLED_B);
42 
50  void setupLED(int redPin = CDPCFG_PIN_RGBLED_R,
51  int greenPin = CDPCFG_PIN_RGBLED_G,
52  int bluePin = CDPCFG_PIN_RGBLED_B);
53 
54 private:
55  int redPin;
56  int greenPin;
57  int bluePin;
58 
59  DuckLed();
60  DuckLed(DuckLed const&) = delete;
61  DuckLed& operator=(DuckLed const&) = delete;
62  static DuckLed* instance;
63 };
64 
65 #endif /* DUCKLED_H_ */
CDPCFG_PIN_RGBLED_R
#define CDPCFG_PIN_RGBLED_R
CDP RGB Led RED Pin default value.
Definition: cdpcfg.h:345
CDPCFG_PIN_RGBLED_B
#define CDPCFG_PIN_RGBLED_B
CDP RGB Led BLUE Pin default value.
Definition: cdpcfg.h:349
DuckLed::setupLED
void setupLED(int redPin=CDPCFG_PIN_RGBLED_R, int greenPin=CDPCFG_PIN_RGBLED_G, int bluePin=CDPCFG_PIN_RGBLED_B)
Initialize access to the LED.
CDPCFG_PIN_RGBLED_G
#define CDPCFG_PIN_RGBLED_G
CDP RGB Led GREEN Pin default value.
Definition: cdpcfg.h:347
DuckLed::setColor
void setColor(int ledR=CDPCFG_PIN_RGBLED_R, int ledG=CDPCFG_PIN_RGBLED_G, int ledB=CDPCFG_PIN_RGBLED_B)
Set the Color object.
DuckLed::getInstance
static DuckLed * getInstance()
Get a singletom instance of the DuckLed class.
DuckLed
Internal on board LED abstraction.
Definition: DuckLed.h:24
cdpcfg.h
CDP central compile-time configuration file.