1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #include "RGBLed.h"
- #include <AP_Common/AP_Common.h>
- class NeoPixel: public RGBLed {
- public:
- NeoPixel();
- struct {
- uint8_t b;
- uint8_t r;
- uint8_t g;
- } RGB;
- uint16_t init_ports();
- protected:
- bool hw_init(void) override;
- bool hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) override;
- private:
- uint16_t enable_mask;
- uint16_t last_mask;
-
- uint32_t _last_init_ms;
-
- void timer();
-
- HAL_Semaphore_Recursive _sem;
- };
|