Open Lighting Architecture
Latest Git
|
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 () |
|
explicit |
Construct a new SPIDMXWidget instance for one widget.
path | The device file path of the serial port |
ola::plugin::spidmx::SPIDMXWidget::~SPIDMXWidget | ( | ) |
Destructor
bool ola::plugin::spidmx::SPIDMXWidget::Close | ( | ) |
Close the widget
bool ola::plugin::spidmx::SPIDMXWidget::IsOpen | ( | ) | const |
Check if the widget is open
|
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.
bool ola::plugin::spidmx::SPIDMXWidget::SetupOutput | ( | ) |
Setup device for DMX Output
Setup our device for DMX receive.