diff options
Diffstat (limited to 'platforms/arm/k20/clockless_arm_k20.h')
-rw-r--r-- | platforms/arm/k20/clockless_arm_k20.h | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/platforms/arm/k20/clockless_arm_k20.h b/platforms/arm/k20/clockless_arm_k20.h index f17ba72d..c0fef13a 100644 --- a/platforms/arm/k20/clockless_arm_k20.h +++ b/platforms/arm/k20/clockless_arm_k20.h @@ -10,7 +10,7 @@ FASTLED_NAMESPACE_BEGIN #define FASTLED_HAS_CLOCKLESS 1 template <int DATA_PIN, int T1, int T2, int T3, EOrder RGB_ORDER = RGB, int XTRA0 = 0, bool FLIP = false, int WAIT_TIME = 50> -class ClocklessController : public CLEDController { +class ClocklessController : public CPixelLEDController<RGB_ORDER> { typedef typename FastPin<DATA_PIN>::port_ptr_t data_ptr_t; typedef typename FastPin<DATA_PIN>::port_t data_t; @@ -26,37 +26,13 @@ public: virtual uint16_t getMaxRefreshRate() const { return 400; } - virtual void clearLeds(int nLeds) { - showColor(CRGB(0, 0, 0), nLeds, 0); - } - protected: - // set all the leds on the controller to a given color - virtual void showColor(const struct CRGB & rgbdata, int nLeds, CRGB scale) { - PixelController<RGB_ORDER> pixels(rgbdata, nLeds, scale, getDither()); - - mWait.wait(); - showRGBInternal(pixels); - mWait.mark(); - } - - virtual void show(const struct CRGB *rgbdata, int nLeds, CRGB scale) { - PixelController<RGB_ORDER> pixels(rgbdata, nLeds, scale, getDither()); - - mWait.wait(); - showRGBInternal(pixels); - mWait.mark(); - } - -#ifdef SUPPORT_ARGB - virtual void show(const struct CARGB *rgbdata, int nLeds, CRGB scale) { - PixelController<RGB_ORDER> pixels(rgbdata, nLeds, scale, getDither()); - mWait.wait(); - showRGBInternal(pixels); - mWait.mark(); - } -#endif + virtual void showPixels(PixelController<RGB_ORDER> & pixels) { + mWait.wait(); + showRGBInternal(pixels); + mWait.mark(); + } template<int BITS> __attribute__ ((always_inline)) inline static void writeBits(register uint32_t & next_mark, register data_ptr_t port, register data_t hi, register data_t lo, register uint8_t & b) { for(register uint32_t i = BITS-1; i > 0; i--) { |