12345678910111213141516171819202122232425262728293031323334353637 |
- #pragma once
- #include "RGBLed.h"
- class DiscreteRGBLed: public RGBLed {
- public:
- DiscreteRGBLed(uint16_t red, uint16_t green, uint16_t blue, bool polarity);
- protected:
- bool hw_init(void) override;
- bool hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue) override;
- private:
- AP_HAL::DigitalSource *red_pin;
- AP_HAL::DigitalSource *green_pin;
- AP_HAL::DigitalSource *blue_pin;
- uint16_t red_pin_number, green_pin_number, blue_pin_number;
- };
|