APM:Libraries
DiscreteRGBLed.h
Go to the documentation of this file.
1 /*
2  * AP_Notify Library.
3  * based upon a prototype library by David "Buzz" Bussenschutt.
4  */
5 
6 /*
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #pragma once
20 
21 #include "RGBLed.h"
22 
23 class DiscreteRGBLed: public RGBLed {
24 public:
25  DiscreteRGBLed(uint16_t red, uint16_t green, uint16_t blue, bool polarity);
26 
27 protected:
28  bool hw_init(void) override;
29  bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) override;
30 
31 private:
35 
37 };
Definition: RGBLed.h:25
bool hw_init(void) override
uint16_t green_pin_number
bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) override
AP_HAL::DigitalSource * red_pin
AP_HAL::DigitalSource * green_pin
uint16_t red_pin_number
AP_HAL::DigitalSource * blue_pin
DiscreteRGBLed(uint16_t red, uint16_t green, uint16_t blue, bool polarity)
uint16_t blue_pin_number