Crate open_dmx

Source
Expand description

Latest Release Documentation License

A wrapper around the serial library to send DMX data over a SerialPort.


§Usage

use open_dmx::DMXSerial;
 
fn main() {
   let mut dmx = DMXSerial::open("COM3").unwrap();
  dmx.set_channels([255; 512]);
  dmx.set_channel(1, 0).unwrap();
}

§Feature flags

  • thread_priority (enabled by default)- Tries to set the thread priority of the SerialPort to MAX

Modules§

error
Error types for the library

Structs§

DMXSerial
A DMX-Interface which writes to the SerialPort independently from the main thread.

Constants§

DMX_CHANNELS
The fixed amount DMX channels for a singe Interface

Functions§

check_valid_channel
Checks if a given usize is a valid DMX channel.