ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
OutputWS2811Uart.hpp
Go to the documentation of this file.
1
#pragma once
2
/*
3
* OutputWS2811Uart.h - WS2811 driver code for ESPixelStick UART
4
*
5
* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6
* Copyright (c) 2015, 2022 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_OutputProtocol_WS2811)
27
28
#include "
OutputWS2811.hpp
"
29
#include "
OutputUart.hpp
"
30
31
class
c_OutputWS2811Uart :
public
c_OutputWS2811
32
{
33
public
:
34
// These functions are inherited from c_OutputCommon
35
c_OutputWS2811Uart (
OM_OutputPortDefinition_t
& OutputPortDefinition,
36
c_OutputMgr::e_OutputProtocolType
outputType);
37
virtual
~c_OutputWS2811Uart ();
38
39
// functions to be provided by the derived class
40
void
Begin ();
41
uint32_t Poll ();
42
#if defined(ARDUINO_ARCH_ESP32)
43
bool
RmtPoll () {
return
false
;}
44
#endif
// defined(ARDUINO_ARCH_ESP32)
45
void
PauseOutput (
bool
State);
46
bool
SetConfig
(ArduinoJson::JsonObject& jsonConfig);
47
void
GetConfig
(ArduinoJson::JsonObject& jsonConfig);
48
void
GetStatus (ArduinoJson::JsonObject& jsonStatus);
49
50
#define WS2811_NUM_DATA_BYTES_PER_INTENSITY_BYTE 4
51
52
private
:
53
c_OutputUart
Uart;
54
#ifdef WS2811_UART_DEBUG_COUNTERS
55
uint32_t NewFrameCounter = 0;
56
uint32_t TimeSinceLastFrameMS = 0;
57
uint32_t TimeLastFrameStartedMS = 0;
58
#endif
// def WS2811_UART_DEBUG_COUNTERS
59
60
};
// c_OutputWS2811Uart
61
62
#endif
// defined(SUPPORT_OutputProtocol_WS2811)
ESPixelStick.h
OutputUart.hpp
OutputWS2811.hpp
c_OutputMgr::e_OutputProtocolType
e_OutputProtocolType
Definition
OutputMgr.hpp:78
c_OutputUart
Definition
OutputUart.hpp:33
GetConfig
void GetConfig(JsonObject &json)
Definition
main.cpp:499
SetConfig
void SetConfig(const char *DataString)
Definition
main.cpp:321
OM_OutputPortDefinition_t
Definition
OutputMgrPortDefs.hpp:90
include
output
OutputWS2811Uart.hpp
Generated by
1.12.0