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

#include <OutputPixel.hpp>

Inheritance diagram for c_OutputPixel:
Collaboration diagram for c_OutputPixel:

Classes

union  ColorOffsets_s
 

Public Member Functions

 c_OutputPixel (c_OutputMgr::e_OutputChannelIds OutputChannelId, gpio_num_t outputGpio, uart_port_t uart, c_OutputMgr::e_OutputType outputType)
 
virtual ~c_OutputPixel ()
 
virtual bool SetConfig (ArduinoJson::JsonObject &jsonConfig)
 Set a new config in the driver.
 
virtual void GetConfig (ArduinoJson::JsonObject &jsonConfig)
 Get the current config used by the driver.
 
virtual void GetStatus (ArduinoJson::JsonObject &jsonStatus)
 
uint32_t GetNumOutputBufferBytesNeeded ()
 
uint32_t GetNumOutputBufferChannelsServiced ()
 
virtual void SetOutputBufferSize (uint32_t NumChannelsAvailable)
 
void SetInvertData (bool _InvertData)
 
virtual void WriteChannelData (uint32_t StartChannelId, uint32_t ChannelCount, byte *pSourceData)
 
virtual void ReadChannelData (uint32_t StartChannelId, uint32_t ChannelCount, byte *pTargetData)
 
void SetIntensityBitTimeInUS (float value)
 
void SetIntensityDataWidth (uint32_t value)
 
void StartNewFrame ()
 
bool IRAM_ATTR ISR_MoreDataToSend ()
 
bool IRAM_ATTR ISR_GetNextIntensityToSend (uint32_t &DataToSend)
 
void SetPixelCount (uint32_t value)
 
uint32_t GetPixelCount ()
 
- Public Member Functions inherited from c_OutputCommon
 c_OutputCommon (c_OutputMgr::e_OutputChannelIds OutputChannelId, gpio_num_t outputGpio, uart_port_t uart, c_OutputMgr::e_OutputType outputType)
 < Start up the driver and put it into a safe mode
 
virtual ~c_OutputCommon ()
 
virtual void Begin ()
 set up the operating environment based on the current config (or defaults)
 
virtual uint32_t Poll ()=0
 Call from loop(), renders output data.
 
virtual void GetDriverName (String &sDriverName)=0
 get the name for the instantiated driver
 
OID_t GetOutputChannelId ()
 return the output channel number
 
uint8_t * GetBufferAddress ()
 Get the address of the buffer into which the E1.31 handler will stuff data.
 
uint32_t GetBufferUsedSize ()
 Get the address of the buffer into which the E1.31 handler will stuff data.
 
gpio_num_t GetOutputGpio ()
 
OTYPE_t GetOutputType ()
 Have the instance report its type.
 
virtual void BaseGetStatus (ArduinoJson::JsonObject &jsonStatus)
 
void SetOutputBufferAddress (uint8_t *pNewOutputBuffer)
 
virtual void PauseOutput (bool NewState)
 
virtual bool ValidateGpio (gpio_num_t ConsoleTxGpio, gpio_num_t ConsoleRxGpio)
 
virtual bool DriverIsSendingIntensityData ()
 
virtual uint32_t GetFrameTimeMs ()
 
bool IsPaused ()
 

Protected Member Functions

void SetFramePrependInformation (const uint8_t *data, uint32_t len)
 
void SetFrameAppendInformation (const uint8_t *data, uint32_t len)
 
void SetPixelPrependInformation (const uint8_t *data, uint32_t len)
 
void SetFrameDurration (float IntensityBitTimeInUs, uint16_t BlockSize=1, float BlockDelayUs=0.0)
 
- Protected Member Functions inherited from c_OutputCommon
virtual void ReportNewFrame ()
 
bool canRefresh ()
 

Protected Attributes

uint16_t InterFrameGapInMicroSec = 300
 
- Protected Attributes inherited from c_OutputCommon
gpio_num_t DataPin = gpio_num_t (-1)
 
uart_port_t UartId = uart_port_t (-1)
 
OTYPE_t OutputType = OTYPE_t::OutputType_Disabled
 
OID_t OutputChannelId = OID_t::OutputChannelId_End
 
bool HasBeenInitialized = false
 
uint32_t FrameDurationInMicroSec = 25000
 
uint32_t ActualFrameDurationMicroSec = 50000
 
uint8_t * pOutputBuffer = nullptr
 
uint32_t OutputBufferSize = 0
 
uint32_t FrameCount = 0
 
bool Paused = false
 

Private Types

typedef union c_OutputPixel::ColorOffsets_s ColorOffsets_t
 

Private Member Functions

uint32_t IRAM_ATTR FramePrependData ()
 
uint32_t IRAM_ATTR PixelPrependNulls ()
 
uint32_t IRAM_ATTR PixelSendPrependIntensity ()
 
uint32_t IRAM_ATTR PixelSendIntensity ()
 
uint32_t IRAM_ATTR PixelAppendNulls ()
 
uint32_t IRAM_ATTR FrameAppendData ()
 
uint32_t IRAM_ATTR FrameDone ()
 
void IRAM_ATTR SetStartingSendPixelState ()
 
void updateGammaTable ()
 Generate gamma correction table.
 
void updateColorOrderOffsets ()
 Update color order.
 
bool validate ()
 confirm that the current configuration is valid
 
uint32_t CalculateIntensityOffset (uint32_t ChannelId)
 
uint32_t IRAM_ATTR GetIntensityData ()
 

Private Attributes

uint32_t NumIntensityBytesPerPixel = PIXEL_DEFAULT_INTENSITY_BYTES_PER_PIXEL
 
uint8_t * NextPixelToSend = nullptr
 
uint32_t pixel_count = 100
 
uint32_t SentPixelsCount = 0
 
uint32_t PixelIntensityCurrentIndex = 0
 
uint32_t PixelIntensityCurrentColor = 0
 
uint8_t * pFramePrependData = nullptr
 
uint32_t FramePrependDataSize = 0
 
uint32_t FramePrependDataCurrentIndex = 0
 
uint8_t * pFrameAppendData = nullptr
 
uint32_t FrameAppendDataSize = 0
 
uint32_t FrameAppendDataCurrentIndex = 0
 
uint8_t * PixelPrependData = nullptr
 
uint32_t PixelPrependDataSize = 0
 
uint32_t PixelPrependDataCurrentIndex = 0
 
uint32_t PixelGroupSize = 1
 
uint32_t PixelGroups = 1
 
float IntensityBitTimeInUs = 0.0
 
uint32_t BlockSize = 1
 
float BlockDelayUs = 0.0
 
uint32_t zig_size = 1
 
uint32_t PrependNullPixelCount = 0
 
uint32_t PrependNullPixelCurrentCount = 0
 
uint32_t AppendNullPixelCount = 0
 
uint32_t AppendNullPixelCurrentCount = 0
 
bool InvertData = false
 
uint32_t IntensityMultiplier = 1
 
uint32_t(c_OutputPixel::* FrameStateFuncPtr )()
 
ColorOffsets_t ColorOffsets
 
uint8_t gamma_table [256] = { 0 }
 Gamma Adjustment table.
 
float gamma = 1.0
 gamma value to use
 
uint8_t brightness = 100
 
uint32_t AdjustedBrightness = 256
 
uint32_t GECEPixelId = 0
 
uint32_t GECEBrightness = 255
 
String color_order = "rgb"
 Pixel color order.
 

Additional Inherited Members

- Public Types inherited from c_OutputCommon
typedef c_OutputMgr::e_OutputChannelIds OID_t
 
typedef c_OutputMgr::e_OutputType OTYPE_t
 

Member Typedef Documentation

◆ ColorOffsets_t

Constructor & Destructor Documentation

◆ c_OutputPixel()

c_OutputPixel::c_OutputPixel ( c_OutputMgr::e_OutputChannelIds OutputChannelId,
gpio_num_t outputGpio,
uart_port_t uart,
c_OutputMgr::e_OutputType outputType )
Here is the call graph for this function:

◆ ~c_OutputPixel()

c_OutputPixel::~c_OutputPixel ( )
virtual

Member Function Documentation

◆ CalculateIntensityOffset()

uint32_t c_OutputPixel::CalculateIntensityOffset ( uint32_t ChannelId)
inlineprivate
Here is the caller graph for this function:

◆ FrameAppendData()

uint32_t IRAM_ATTR c_OutputPixel::FrameAppendData ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FrameDone()

uint32_t IRAM_ATTR c_OutputPixel::FrameDone ( )
private
Here is the caller graph for this function:

◆ FramePrependData()

uint32_t IRAM_ATTR c_OutputPixel::FramePrependData ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConfig()

void c_OutputPixel::GetConfig ( ArduinoJson::JsonObject & jsonConfig)
virtual

Get the current config used by the driver.

Reimplemented from c_OutputCommon.

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

◆ GetIntensityData()

uint32_t IRAM_ATTR c_OutputPixel::GetIntensityData ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNumOutputBufferBytesNeeded()

uint32_t c_OutputPixel::GetNumOutputBufferBytesNeeded ( )
inlinevirtual

Implements c_OutputCommon.

Here is the caller graph for this function:

◆ GetNumOutputBufferChannelsServiced()

uint32_t c_OutputPixel::GetNumOutputBufferChannelsServiced ( )
inlinevirtual

Implements c_OutputCommon.

Here is the call graph for this function:

◆ GetPixelCount()

uint32_t c_OutputPixel::GetPixelCount ( )
inline

◆ GetStatus()

void c_OutputPixel::GetStatus ( ArduinoJson::JsonObject & jsonStatus)
virtual

Implements c_OutputCommon.

Here is the call graph for this function:

◆ ISR_GetNextIntensityToSend()

bool IRAM_ATTR c_OutputPixel::ISR_GetNextIntensityToSend ( uint32_t & DataToSend)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ISR_MoreDataToSend()

bool IRAM_ATTR c_OutputPixel::ISR_MoreDataToSend ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PixelAppendNulls()

uint32_t IRAM_ATTR c_OutputPixel::PixelAppendNulls ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PixelPrependNulls()

uint32_t IRAM_ATTR c_OutputPixel::PixelPrependNulls ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PixelSendIntensity()

uint32_t IRAM_ATTR c_OutputPixel::PixelSendIntensity ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PixelSendPrependIntensity()

uint32_t IRAM_ATTR c_OutputPixel::PixelSendPrependIntensity ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadChannelData()

void c_OutputPixel::ReadChannelData ( uint32_t StartChannelId,
uint32_t ChannelCount,
byte * pTargetData )
virtual

Reimplemented from c_OutputCommon.

Here is the call graph for this function:

◆ SetConfig()

bool c_OutputPixel::SetConfig ( ArduinoJson::JsonObject & jsonConfig)
virtual

Set a new config in the driver.

Reimplemented from c_OutputCommon.

Here is the call graph for this function:

◆ SetFrameAppendInformation()

void c_OutputPixel::SetFrameAppendInformation ( const uint8_t * data,
uint32_t len )
protected

◆ SetFrameDurration()

void c_OutputPixel::SetFrameDurration ( float IntensityBitTimeInUs,
uint16_t BlockSize = 1,
float BlockDelayUs = 0.0 )
protected
Here is the caller graph for this function:

◆ SetFramePrependInformation()

void c_OutputPixel::SetFramePrependInformation ( const uint8_t * data,
uint32_t len )
protected

◆ SetIntensityBitTimeInUS()

void c_OutputPixel::SetIntensityBitTimeInUS ( float value)
inline

◆ SetIntensityDataWidth()

void c_OutputPixel::SetIntensityDataWidth ( uint32_t value)

◆ SetInvertData()

void c_OutputPixel::SetInvertData ( bool _InvertData)
inline

◆ SetOutputBufferSize()

void c_OutputPixel::SetOutputBufferSize ( uint32_t NumChannelsAvailable)
virtual

Reimplemented from c_OutputCommon.

Here is the call graph for this function:

◆ SetPixelCount()

void c_OutputPixel::SetPixelCount ( uint32_t value)
inline

◆ SetPixelPrependInformation()

void c_OutputPixel::SetPixelPrependInformation ( const uint8_t * data,
uint32_t len )
protected

◆ SetStartingSendPixelState()

void IRAM_ATTR c_OutputPixel::SetStartingSendPixelState ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartNewFrame()

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

◆ updateColorOrderOffsets()

void c_OutputPixel::updateColorOrderOffsets ( )
private

Update color order.

Here is the caller graph for this function:

◆ updateGammaTable()

void c_OutputPixel::updateGammaTable ( )
private

Generate gamma correction table.

Here is the caller graph for this function:

◆ validate()

bool c_OutputPixel::validate ( )
private

confirm that the current configuration is valid

Here is the caller graph for this function:

◆ WriteChannelData()

void c_OutputPixel::WriteChannelData ( uint32_t StartChannelId,
uint32_t ChannelCount,
byte * pSourceData )
virtual

Reimplemented from c_OutputCommon.

Here is the call graph for this function:

Member Data Documentation

◆ AdjustedBrightness

uint32_t c_OutputPixel::AdjustedBrightness = 256
private

◆ AppendNullPixelCount

uint32_t c_OutputPixel::AppendNullPixelCount = 0
private

◆ AppendNullPixelCurrentCount

uint32_t c_OutputPixel::AppendNullPixelCurrentCount = 0
private

◆ BlockDelayUs

float c_OutputPixel::BlockDelayUs = 0.0
private

◆ BlockSize

uint32_t c_OutputPixel::BlockSize = 1
private

◆ brightness

uint8_t c_OutputPixel::brightness = 100
private

◆ color_order

String c_OutputPixel::color_order = "rgb"
private

Pixel color order.

◆ ColorOffsets

ColorOffsets_t c_OutputPixel::ColorOffsets
private

◆ FrameAppendDataCurrentIndex

uint32_t c_OutputPixel::FrameAppendDataCurrentIndex = 0
private

◆ FrameAppendDataSize

uint32_t c_OutputPixel::FrameAppendDataSize = 0
private

◆ FramePrependDataCurrentIndex

uint32_t c_OutputPixel::FramePrependDataCurrentIndex = 0
private

◆ FramePrependDataSize

uint32_t c_OutputPixel::FramePrependDataSize = 0
private

◆ FrameStateFuncPtr

uint32_t(c_OutputPixel::* c_OutputPixel::FrameStateFuncPtr) ()
private

◆ gamma

float c_OutputPixel::gamma = 1.0
private

gamma value to use

◆ gamma_table

uint8_t c_OutputPixel::gamma_table[256] = { 0 }
private

Gamma Adjustment table.

◆ GECEBrightness

uint32_t c_OutputPixel::GECEBrightness = 255
private

◆ GECEPixelId

uint32_t c_OutputPixel::GECEPixelId = 0
private

◆ IntensityBitTimeInUs

float c_OutputPixel::IntensityBitTimeInUs = 0.0
private

◆ IntensityMultiplier

uint32_t c_OutputPixel::IntensityMultiplier = 1
private

◆ InterFrameGapInMicroSec

uint16_t c_OutputPixel::InterFrameGapInMicroSec = 300
protected

◆ InvertData

bool c_OutputPixel::InvertData = false
private

◆ NextPixelToSend

uint8_t* c_OutputPixel::NextPixelToSend = nullptr
private

◆ NumIntensityBytesPerPixel

uint32_t c_OutputPixel::NumIntensityBytesPerPixel = PIXEL_DEFAULT_INTENSITY_BYTES_PER_PIXEL
private

◆ pFrameAppendData

uint8_t* c_OutputPixel::pFrameAppendData = nullptr
private

◆ pFramePrependData

uint8_t* c_OutputPixel::pFramePrependData = nullptr
private

◆ pixel_count

uint32_t c_OutputPixel::pixel_count = 100
private

◆ PixelGroups

uint32_t c_OutputPixel::PixelGroups = 1
private

◆ PixelGroupSize

uint32_t c_OutputPixel::PixelGroupSize = 1
private

◆ PixelIntensityCurrentColor

uint32_t c_OutputPixel::PixelIntensityCurrentColor = 0
private

◆ PixelIntensityCurrentIndex

uint32_t c_OutputPixel::PixelIntensityCurrentIndex = 0
private

◆ PixelPrependData

uint8_t* c_OutputPixel::PixelPrependData = nullptr
private

◆ PixelPrependDataCurrentIndex

uint32_t c_OutputPixel::PixelPrependDataCurrentIndex = 0
private

◆ PixelPrependDataSize

uint32_t c_OutputPixel::PixelPrependDataSize = 0
private

◆ PrependNullPixelCount

uint32_t c_OutputPixel::PrependNullPixelCount = 0
private

◆ PrependNullPixelCurrentCount

uint32_t c_OutputPixel::PrependNullPixelCurrentCount = 0
private

◆ SentPixelsCount

uint32_t c_OutputPixel::SentPixelsCount = 0
private

◆ zig_size

uint32_t c_OutputPixel::zig_size = 1
private

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