ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
OutputAPA102Spi.hpp
Go to the documentation of this file.
1#pragma once
2/*
3* OutputAPA102Spi.h - APA102 driver code for ESPixelStick Spi Channel
4*
5* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6* Copyright (c) 2015, 2025 Shelby Merrick
7* http://www.forkineye.com
8*
9* This program is provided free for you to use in any way that you wish,
10* subject to the laws and regulations where you are using it. Due diligence
11* is strongly suggested before using this code. Please give credit where due.
12*
13* The Author makes no warranty of any kind, express or implied, with regard
14* to this program or the documentation contained in this document. The
15* Author shall not be liable in any event for incidental or consequential
16* damages in connection with, or arising out of, the furnishing, performance
17* or use of these programs.
18*
19* This is a derived class that converts data in the output buffer into
20* pixel intensities and then transmits them through the configured serial
21* interface.
22*
23*/
24
25#include "ESPixelStick.h"
26#if defined(SUPPORT_OutputType_APA102) && defined(SUPPORT_SPI_OUTPUT)
27
28#include "OutputAPA102.hpp"
29#include "OutputSpi.hpp"
30
31class c_OutputAPA102Spi : public c_OutputAPA102
32{
33public:
34 // These functions are inherited from c_OutputCommon
35 c_OutputAPA102Spi (c_OutputMgr::e_OutputChannelIds OutputChannelId,
36 gpio_num_t outputGpio,
37 uart_port_t uart,
38 c_OutputMgr::e_OutputType outputType);
39 virtual ~c_OutputAPA102Spi ();
40
41 // functions to be provided by the derived class
42 void Begin ();
43 void GetConfig (ArduinoJson::JsonObject& jsonConfig);
44 bool SetConfig (ArduinoJson::JsonObject& jsonConfig);
45 uint32_t Poll ();
46#if defined(ARDUINO_ARCH_ESP32)
47 bool RmtPoll () {return false;}
48#endif // defined(ARDUINO_ARCH_ESP32)
49
50private:
51
52 c_OutputSpi Spi;
53
54}; // c_OutputAPA102Spi
55
56#endif // defined(SUPPORT_OutputType_APA102) && defined(SUPPORT_SPI_OUTPUT)
e_OutputChannelIds
Definition OutputMgr.hpp:67
e_OutputType
Definition OutputMgr.hpp:126
void GetConfig(JsonObject &json)
Definition main.cpp:440
void SetConfig(const char *DataString)
Definition main.cpp:286