ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
OutputSerialUart.hpp
Go to the documentation of this file.
1#pragma once
2/******************************************************************
3*
4* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel (And Serial!) driver
5* Orginal ESPixelStickproject by 2015 - 2025 Shelby Merrick
6*
7*This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12<http://www.gnu.org/licenses/>
13*
14*This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
15*To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or
16*send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
17******************************************************************
18*
19* This is a derived class that converts data in the output buffer into
20* serial channel intensities and then transmits them through the configured serial
21* interface.
22*
23*/
24#include "ESPixelStick.h"
25
26#if defined(SUPPORT_OutputType_DMX) || defined(SUPPORT_OutputType_Serial) || defined(SUPPORT_OutputType_Renard)
27
28#include "OutputSerial.hpp"
29#include "OutputUart.hpp"
30
31class c_OutputSerialUart : public c_OutputSerial
32{
33public:
34 // These functions are inherited from c_OutputCommon
35 c_OutputSerialUart (c_OutputMgr::e_OutputChannelIds OutputChannelId,
36 gpio_num_t outputGpio,
37 uart_port_t uart,
38 c_OutputMgr::e_OutputType outputType);
39 virtual ~c_OutputSerialUart ();
40
41 // functions to be provided by the derived class
42 void Begin ();
43 virtual bool SetConfig(ArduinoJson::JsonObject &jsonConfig);
44 virtual void GetConfig(ArduinoJson::JsonObject &jsonConfig);
45 virtual void GetStatus(ArduinoJson::JsonObject &jsonStatus);
46 uint32_t Poll();
47#if defined(ARDUINO_ARCH_ESP32)
48 bool RmtPoll () {return false;}
49#endif // defined(ARDUINO_ARCH_ESP32)
50 void PauseOutput (bool NewState);
51
52private:
53 c_OutputUart Uart;
54
55}; // c_OutputSerialUart
56
57#endif // defined(SUPPORT_OutputType_DMX) || defined(SUPPORT_OutputType_Serial) || defined(SUPPORT_OutputType_Renard)
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