ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
c_OutputUart Class Reference

#include <OutputUart.hpp>

Collaboration diagram for c_OutputUart:

Classes

struct  ConvertIntensityToUartDataStreamEntry_t
 
struct  OutputUartConfig_t
 

Public Types

enum  UartDatauint32_t {
  OUTPUT_UART_5N1 = 0 , OUTPUT_UART_5N2 , OUTPUT_UART_6N1 , OUTPUT_UART_6N2 ,
  OUTPUT_UART_7N1 , OUTPUT_UART_7N2 , OUTPUT_UART_8N1 , OUTPUT_UART_8N2
}
 
enum  TranslateIntensityData_t { NoTranslation = 0 , OneToOne , TwoToOne }
 
enum  UartDataBitTranslationId_t {
  Uart_DATA_BIT_00_ID = 0 , Uart_DATA_BIT_01_ID , Uart_DATA_BIT_10_ID , Uart_DATA_BIT_11_ID ,
  Uart_LIST_END , Uart_INVALID_VALUE , Uart_NUM_BIT_TYPES = Uart_LIST_END
}
 
typedef ConvertIntensityToUartDataStreamEntry_t CitudsArray_t
 

Public Member Functions

 c_OutputUart ()
 
virtual ~c_OutputUart ()
 
void Begin (c_OutputUart::OutputUartConfig_t &config)
 
bool SetConfig (ArduinoJson::JsonObject &jsonConfig)
 
void GetConfig (ArduinoJson::JsonObject &jsonConfig)
 
void GetDriverName (String &sDriverName)
 
void GetStatus (ArduinoJson::JsonObject &jsonStatus)
 
void PauseOutput (bool State)
 
void StartNewFrame ()
 
void IRAM_ATTR ISR_UART_Handler ()
 
void IRAM_ATTR ISR_Handler_SendIntensityData ()
 

Private Member Functions

void StartUart ()
 
bool RegisterUartIsrHandler ()
 
void InitializeUart ()
 
void set_pin ()
 
void TerminateSerialPortOperation ()
 
void RestoreSerialPortOperation ()
 
void ReportNewFrame ()
 
void StartBreak ()
 
void EndBreak ()
 
void GenerateBreak (uint32_t DurationInUs, uint32_t MarkDurationInUs)
 
void SetIntensityDataWidth ()
 
void SetIntensity2Uart (uint8_t value, UartDataBitTranslationId_t ID)
 
void IRAM_ATTR StartNewDataFrame ()
 
void CalculateEnableUartInterruptFlags ()
 
uint32_t IRAM_ATTR getUartFifoLength ()
 
bool IRAM_ATTR MoreDataToSend ()
 
bool IRAM_ATTR GetNextIntensityToSend (uint32_t &DataToSend)
 
void IRAM_ATTR enqueueUartData (uint8_t value)
 
void IRAM_ATTR EnableUartInterrupts ()
 
void IRAM_ATTR ClearUartInterrupts ()
 
void IRAM_ATTR DisableUartInterrupts ()
 

Private Attributes

OutputUartConfig_t OutputUartConfig
 
uint8_t Intensity2Uart [UartDataBitTranslationId_t::Uart_LIST_END]
 
bool OutputIsPaused = false
 
uint32_t TxIntensityDataStartingMask = 0x80
 
bool HasBeenInitialized = false
 
uint32_t NumUartSlotsPerIntensityValue = 1
 
uint32_t MarkAfterInterintensityBreakBitCCOUNT = 0
 
uint32_t ActiveIsrMask = 0
 

Member Typedef Documentation

◆ CitudsArray_t

Member Enumeration Documentation

◆ TranslateIntensityData_t

Enumerator
NoTranslation 
OneToOne 
TwoToOne 

◆ UartDataBitTranslationId_t

Enumerator
Uart_DATA_BIT_00_ID 
Uart_DATA_BIT_01_ID 
Uart_DATA_BIT_10_ID 
Uart_DATA_BIT_11_ID 
Uart_LIST_END 
Uart_INVALID_VALUE 
Uart_NUM_BIT_TYPES 

◆ UartDatauint32_t

Enumerator
OUTPUT_UART_5N1 
OUTPUT_UART_5N2 
OUTPUT_UART_6N1 
OUTPUT_UART_6N2 
OUTPUT_UART_7N1 
OUTPUT_UART_7N2 
OUTPUT_UART_8N1 
OUTPUT_UART_8N2 

Constructor & Destructor Documentation

◆ c_OutputUart()

c_OutputUart::c_OutputUart ( )

◆ ~c_OutputUart()

c_OutputUart::~c_OutputUart ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ Begin()

void c_OutputUart::Begin ( c_OutputUart::OutputUartConfig_t & config)
Here is the call graph for this function:

◆ CalculateEnableUartInterruptFlags()

void c_OutputUart::CalculateEnableUartInterruptFlags ( )
private

DEBUG_START;

DEBUG_V();

DEBUG_END;

◆ ClearUartInterrupts()

void IRAM_ATTR c_OutputUart::ClearUartInterrupts ( )
inlineprivate
Here is the caller graph for this function:

◆ DisableUartInterrupts()

void IRAM_ATTR c_OutputUart::DisableUartInterrupts ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnableUartInterrupts()

void IRAM_ATTR c_OutputUart::EnableUartInterrupts ( )
inlineprivate

DEBUG_START;

DEBUG_V("dont turn on interrupts if there is no more data to send");

DEBUG_END;

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndBreak()

void c_OutputUart::EndBreak ( )
private
Here is the caller graph for this function:

◆ enqueueUartData()

void IRAM_ATTR c_OutputUart::enqueueUartData ( uint8_t value)
inlineprivate
Here is the caller graph for this function:

◆ GenerateBreak()

void c_OutputUart::GenerateBreak ( uint32_t DurationInUs,
uint32_t MarkDurationInUs )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConfig()

void c_OutputUart::GetConfig ( ArduinoJson::JsonObject & jsonConfig)

◆ GetDriverName()

void c_OutputUart::GetDriverName ( String & sDriverName)
inline

◆ GetNextIntensityToSend()

bool IRAM_ATTR c_OutputUart::GetNextIntensityToSend ( uint32_t & DataToSend)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStatus()

void c_OutputUart::GetStatus ( ArduinoJson::JsonObject & jsonStatus)
Here is the call graph for this function:

◆ getUartFifoLength()

uint32_t IRAM_ATTR c_OutputUart::getUartFifoLength ( )
inlineprivate
Here is the caller graph for this function:

◆ InitializeUart()

void c_OutputUart::InitializeUart ( )
private
Here is the caller graph for this function:

◆ ISR_Handler_SendIntensityData()

void IRAM_ATTR c_OutputUart::ISR_Handler_SendIntensityData ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ISR_UART_Handler()

void IRAM_ATTR c_OutputUart::ISR_UART_Handler ( )
Here is the call graph for this function:

◆ MoreDataToSend()

bool IRAM_ATTR c_OutputUart::MoreDataToSend ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PauseOutput()

void c_OutputUart::PauseOutput ( bool State)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterUartIsrHandler()

bool c_OutputUart::RegisterUartIsrHandler ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReportNewFrame()

void c_OutputUart::ReportNewFrame ( )
private

◆ RestoreSerialPortOperation()

void c_OutputUart::RestoreSerialPortOperation ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pin()

void c_OutputUart::set_pin ( )
private
Here is the call graph for this function:

◆ SetConfig()

bool c_OutputUart::SetConfig ( ArduinoJson::JsonObject & jsonConfig)
Here is the call graph for this function:

◆ SetIntensity2Uart()

void c_OutputUart::SetIntensity2Uart ( uint8_t value,
UartDataBitTranslationId_t ID )
private
Here is the caller graph for this function:

◆ SetIntensityDataWidth()

void c_OutputUart::SetIntensityDataWidth ( )
private
Here is the caller graph for this function:

◆ StartBreak()

void c_OutputUart::StartBreak ( )
private
Here is the caller graph for this function:

◆ StartNewDataFrame()

void IRAM_ATTR c_OutputUart::StartNewDataFrame ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartNewFrame()

void c_OutputUart::StartNewFrame ( )
Here is the call graph for this function:

◆ StartUart()

void c_OutputUart::StartUart ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TerminateSerialPortOperation()

void c_OutputUart::TerminateSerialPortOperation ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ActiveIsrMask

uint32_t c_OutputUart::ActiveIsrMask = 0
private

◆ HasBeenInitialized

bool c_OutputUart::HasBeenInitialized = false
private

◆ Intensity2Uart

uint8_t c_OutputUart::Intensity2Uart[UartDataBitTranslationId_t::Uart_LIST_END]
private

◆ MarkAfterInterintensityBreakBitCCOUNT

uint32_t c_OutputUart::MarkAfterInterintensityBreakBitCCOUNT = 0
private

◆ NumUartSlotsPerIntensityValue

uint32_t c_OutputUart::NumUartSlotsPerIntensityValue = 1
private

◆ OutputIsPaused

bool c_OutputUart::OutputIsPaused = false
private

◆ OutputUartConfig

OutputUartConfig_t c_OutputUart::OutputUartConfig
private

◆ TxIntensityDataStartingMask

uint32_t c_OutputUart::TxIntensityDataStartingMask = 0x80
private

The documentation for this class was generated from the following files: