supla-device
Loading...
Searching...
No Matches
rgb_leds.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_CONTROL_RGB_LEDS_H_
5#define SRC_SUPLA_CONTROL_RGB_LEDS_H_
6
7#include <supla/io.h>
8
9#include "rgb_base.h"
10
11namespace Supla {
12namespace Control {
13class RGBLeds : public RGBBase {
14 public:
15 RGBLeds(Supla::Io::Base *io, int redPin, int greenPin, int bluePin);
16 RGBLeds(int redPin, int greenPin, int bluePin);
18 Supla::Io::IoPin greenPin,
19 Supla::Io::IoPin bluePin);
20
21 void setRGBWValueOnDevice(uint32_t red,
22 uint32_t green,
23 uint32_t blue,
24 uint32_t brightness) override;
25
26 void onInit() override;
27
28 protected:
29 Supla::Io::IoPin redPin;
30 Supla::Io::IoPin greenPin;
31 Supla::Io::IoPin bluePin;
32};
33
34}; // namespace Control
35}; // namespace Supla
36
37#endif // SRC_SUPLA_CONTROL_RGB_LEDS_H_
Definition rgb_base.h:11
Definition rgb_leds.h:13
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition rgb_leds.cpp:51
Definition io.h:23
Definition io_pin.h:14