diff --git a/src/WsledInterface.cpp b/src/WsledInterface.cpp new file mode 100644 index 0000000..18827b3 --- /dev/null +++ b/src/WsledInterface.cpp @@ -0,0 +1,21 @@ + +#include "WsledInterface.hpp" + +WsledInterface::WsledInterface(const wsled_t* device) { + +} + +STATUS WsledInterface::writePixel(CRGB pixel, size_t index) { + + return OKAY; +} + +STATUS WsledInterface::get(CRGB* pixel, size_t index) { + + return OKAY; +} + +STATUS WsledInterface::flush() { + + return OKAY; +} diff --git a/src/WsledInterface.hpp b/src/WsledInterface.hpp new file mode 100644 index 0000000..0e96fee --- /dev/null +++ b/src/WsledInterface.hpp @@ -0,0 +1,38 @@ + +#pragma once + +#include "stdint.h" + +#include "drivers/wsled.h" +#include "common.h" + +class WsledInterface { + +public: + + WsledInterface(const wsled_t* device); + ~WsledInterface() = default; + + // Sets a pixel in the leds buffer to a particular color + // index: the order in the strip of the pixel + // Returns: execution status + STATUS writePixel(CRGB pixel, size_t index); + + // Copies the color currently in a pixel to the pointer + // index: the order in the strip of the pixel + // Returns: execution status + STATUS get(CRGB* pixel, size_t index); + + // Writes all the data in the leds buffer to hardware + // Returns: execution status + STATUS flush(); + +private: + + const wsled_t* device_; + + static constexpr size_t numLeds_ = 4; + + CRGB leds_[numLeds_]; + +};