12345678910111213141516171819202122232425262728293031323334353637 |
- #pragma once
- #include <AP_HAL/I2CDevice.h>
- #include "RGBLed.h"
- class PCA9685LED_I2C : public RGBLed
- {
- public:
- PCA9685LED_I2C(void);
- protected:
- bool hw_init(void) override;
- bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
- private:
- AP_HAL::OwnPtr<AP_HAL::I2CDevice> _dev;
- void _timer(void);
- struct {
- uint8_t r, g, b;
- } rgb;
- bool _need_update;
- };
|