Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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

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
ola::plugin::spidmx::SPIDMXWidget::~SPIDMXWidget ( )

Destructor

Member Function Documentation

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

Close the widget

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

Check if the widget is open

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

Get the widget's device name

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

Open the widget

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
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: