Open Lighting Architecture  Latest Git
Public Member Functions | List of all members
ola::plugin::spidmx::SPIDMXWidget Class Reference

Detailed Description

An SPI widget (i.e. a serial port with suitable hardware attached)

Public Member Functions

 SPIDMXWidget (const std::string &path)
 
 ~SPIDMXWidget ()
 
std::string Name () const
 
std::string Description () const
 
bool Open ()
 
bool Close ()
 
bool IsOpen () const
 
bool ReadWrite (uint8_t *tx_buf, uint8_t *rx_buf, uint32_t blocklength)
 
bool SetupOutput ()
 

Constructor & Destructor Documentation

◆ SPIDMXWidget()

ola::plugin::spidmx::SPIDMXWidget::SPIDMXWidget ( const std::string &  path)
explicit

Construct a new SPIDMXWidget instance for one widget.

Parameters
pathThe device file path of the serial port

◆ ~SPIDMXWidget()

ola::plugin::spidmx::SPIDMXWidget::~SPIDMXWidget ( )

Destructor

Member Function Documentation

◆ Close()

bool ola::plugin::spidmx::SPIDMXWidget::Close ( )

Close the widget

◆ IsOpen()

bool ola::plugin::spidmx::SPIDMXWidget::IsOpen ( ) const

Check if the widget is open

◆ Name()

std::string ola::plugin::spidmx::SPIDMXWidget::Name ( ) const
inline

Get the widget's device name

◆ Open()

bool ola::plugin::spidmx::SPIDMXWidget::Open ( )

Open the widget

◆ ReadWrite()

bool ola::plugin::spidmx::SPIDMXWidget::ReadWrite ( uint8_t *  tx_buf,
uint8_t *  rx_buf,
uint32_t  blocklength 
)

Read and write data from / to a previously-opened line. This operation works like a shift register. Both buffers must be of the specified size.

Transmit tx_buf to the SPI bus and read data from the SPI bus into rx_buf. Both must be of the specified blocklength.

Returns
false if send/receive operation failed, true otherwise

◆ SetupOutput()

bool ola::plugin::spidmx::SPIDMXWidget::SetupOutput ( )

Setup device for DMX Output

Setup our device for DMX receive.


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