[−][src]Struct matrix_rhal::Bus
Bridge for talking to the MATRIX Kernel Modules. Most, if not all, MATRIX functionality requires this Bus to read and write data.
Fields
device_file: &'static str
Path for the device file being used. This is what's used to communicate with the MATRIX Kernel.
regmap_fd: RawFd
File descriptor for kernel abstraction.
device_name: Device
The type of MATRIX device that's currently attached.
device_leds: u8
Number of LEDS on the MATRIX device.
Methods
impl Bus
[src]
pub fn init() -> Result<Bus, Error>
[src]
Create, initialize, and return a MATRIX Bus
pub fn write(&self, write_buffer: &mut [u8])
[src]
Populate a buffer with the requested data.
address
and read_buffer
will be added to the 1 and 2 index of your buffer.
Any data added should start at index 2.
pub fn read(&self, read_buffer: &mut [u8])
[src]
Populate a buffer with the requested data.
address
and read_buffer
will be added to the 1 and 2 index of your buffer.
Any data returned will start at the index 2.
pub fn close(&self)
[src]
Close the file descriptor that's communicating with the MATRIX Kernel's device file.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Bus
impl Send for Bus
impl Sync for Bus
impl Unpin for Bus
impl UnwindSafe for Bus
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,