ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
OutputTLS3001Rmt.hpp
Go to the documentation of this file.
1#pragma once
2/*
3* OutputTLS3001Rmt.h - TLS3001 driver code for ESPixelStick RMT Channel
4*
5* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
6* Copyright (c) 2015, 2026 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#include "ESPixelStick.h"
25#if defined(SUPPORT_OutputProtocol_TLS3001) && defined (ARDUINO_ARCH_ESP32)
26
27#include "OutputTLS3001.hpp"
28#include "OutputRmt.hpp"
30
31class c_OutputTLS3001Rmt : public c_OutputTLS3001
32{
33public:
34 // These functions are inherited from c_OutputCommon
35 c_OutputTLS3001Rmt(OM_OutputPortDefinition_t & OutputPortDefinition,
37 virtual ~c_OutputTLS3001Rmt ();
38
39 // functions to be provided by the derived class
40 void Begin ();
41 bool SetConfig (ArduinoJson::JsonObject& jsonConfig);
42 uint32_t Poll ();
43 bool RmtPoll ();
44 void GetStatus (ArduinoJson::JsonObject& jsonStatus);
45 void SetOutputBufferSize (uint32_t NumChannelsAvailable);
46 void PauseOutput(bool State);
47 bool IRAM_ATTR ISR_GetNextBitToSend (uint32_t &DataToSend);
48
49private:
50 void SetBitTimes ();
51
52protected:
53 friend class fsm_RMT_state_SendSync;
54 friend class fsm_RMT_state_SendReset;
55 friend class fsm_RMT_state_SendDataStart;
56 friend class fsm_RMT_state_SendData;
57 friend class fsm_RMT_state_SendDataIdle;
58 friend class fsm_RMT_state;
59 OutputTLS3001RmtFsmStates_t CurrentFsmState = OutputTLS3001RmtFsmStates_t::TLS3001DataIdle;
60
61 fsm_RMT_state_SendSync fsm_RMT_state_SendSync_imp;
62 fsm_RMT_state_SendReset fsm_RMT_state_SendReset_imp;
63 fsm_RMT_state_SendDataStart fsm_RMT_state_SendDataStart_imp;
64 fsm_RMT_state_SendData fsm_RMT_state_SendData_imp;
65 fsm_RMT_state_SendDataIdle fsm_RMT_state_SendDataIdle_imp;
66
67 rmt_item32_t RmtResetOneMsDelay;
68 uint32_t NumResetDelayBits = 1;
69
70 rmt_item32_t RmtSyncIdle;
71 uint32_t NumSyncIdleBits = 1;
72
73 rmt_item32_t SendDataIfg;
74 uint32_t NumIfgBitsPerFrame = 1;
75
76 bool SendingData = false;
77
78 c_OutputRmt Rmt;
79
80}; // c_OutputTLS3001Rmt
81
82#endif // defined(SUPPORT_OutputProtocol_TLS3001) && defined (ARDUINO_ARCH_ESP32)
e_OutputProtocolType
Definition OutputMgr.hpp:78
void SetConfig(const char *DataString)
Definition main.cpp:329
Definition OutputMgrPortDefs.hpp:90