[−][src]Crate blinkrs
This crate provides a lightweight wrapper around the libusb crate specifically targeting the API of a blink(1) usb device.
Example
use std::boxed::Box; use std::error::Error; use blinkrs::{Blinkers, Message}; fn main() -> Result<(), Box<dyn Error>> { let blinkers: Blinkers = match Blinkers::new() { Ok(b) => b, Err(_e) => { println!("unable to find device"); return Ok(()) }, }; blinkers.send(Message::from("red"))?; blinkers.send(Message::from("off"))?; Ok(()) }
Structs
Blinkers | Wraps the |
Enums
BlinkError | |
Color | Represents a color mode that can be applied to the |
Message | Represents a command processable by the specification outlined in the blink1 docs. |