scdsu-core 0.1.5

core library crate for steam-controler-dsu
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::dsu::DSUFrame;
use crate::errors::DeviceError;

/// A trait defining shared behavior between compatible devices.
pub trait Device {
    /// Run any initialization logic the device requires.
    fn initialize(&self) -> Result<(), DeviceError>;

    /// Read a DSU frame from the device.
    fn read_frame(&self) -> Result<DSUFrame, DeviceError>;
}