ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
OutputUCS8903Uart.hpp
Go to the documentation of this file.
1#pragma once
2/*
3* OutputUCS8903Uart.h - UCS8903 driver code for ESPixelStick UART
4*
5* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6* Copyright (c) 2015 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, bor 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 "OutputCommon.hpp"
26
27#if defined(SUPPORT_OutputType_UCS8903)
28
29#include "OutputUCS8903.hpp"
30#include "OutputUart.hpp"
31
32class c_OutputUCS8903Uart : public c_OutputUCS8903
33{
34public:
35 // These functions are inherited from c_OutputCommon
36 c_OutputUCS8903Uart (c_OutputMgr::e_OutputChannelIds OutputChannelId,
37 gpio_num_t outputGpio,
38 uart_port_t uart,
39 c_OutputMgr::e_OutputType outputType);
40 virtual ~c_OutputUCS8903Uart ();
41
42 // functions to be provided by the derived class
43 void Begin ();
44 uint32_t Poll ();
45#if defined(ARDUINO_ARCH_ESP32)
46 bool RmtPoll () {return false;}
47#endif // defined(ARDUINO_ARCH_ESP32)
48 void PauseOutput (bool State);
49 bool SetConfig (ArduinoJson::JsonObject& jsonConfig);
50 void GetConfig (ArduinoJson::JsonObject& jsonConfig);
51 void GetStatus (ArduinoJson::JsonObject& jsonStatus);
52
53private:
54 c_OutputUart Uart;
55#ifdef UCS8903_UART_DEBUG_COUNTERS
56 uint32_t NewFrameCounter = 0;
57 uint32_t TimeSinceLastFrameMS = 0;
58 uint32_t TimeLastFrameStartedMS = 0;
59#endif // def UCS8903_UART_DEBUG_COUNTERS
60
61}; // c_OutputUCS8903Uart
62
63#endif // defined(SUPPORT_OutputType_UCS8903)
e_OutputChannelIds
Definition OutputMgr.hpp:67
e_OutputType
Definition OutputMgr.hpp:126
Definition OutputUart.hpp:33
void GetConfig(JsonObject &json)
Definition main.cpp:440
void SetConfig(const char *DataString)
Definition main.cpp:286