pub trait InterfaceExt: Interface {
// Provided methods
fn write_command(
&mut self,
command: impl DcsCommand,
) -> impl Future<Output = Result<(), Self::Error>> { ... }
fn write_raw(
&mut self,
instruction: u8,
param_bytes: &[u8],
) -> impl Future<Output = Result<(), Self::Error>> { ... }
}
Expand description
An extension trait for Interface
with support for writing DCS commands.
Commands which are part of the manufacturer independent user command set can be sent to the
display by using the write_command
method with one of the command types
in this module.
All other commands, which do not have an associated type in this module, can be sent using
the write_raw
method.
Provided Methods§
Sourcefn write_command(
&mut self,
command: impl DcsCommand,
) -> impl Future<Output = Result<(), Self::Error>>
fn write_command( &mut self, command: impl DcsCommand, ) -> impl Future<Output = Result<(), Self::Error>>
Sends a DCS command to the display interface.
Sourcefn write_raw(
&mut self,
instruction: u8,
param_bytes: &[u8],
) -> impl Future<Output = Result<(), Self::Error>>
fn write_raw( &mut self, instruction: u8, param_bytes: &[u8], ) -> impl Future<Output = Result<(), Self::Error>>
Sends a raw command with the given instruction
to the display interface.
The param_bytes
slice can contain the instruction parameters, which are sent as data after
the instruction code was sent. If no parameters are required an empty slice can be passed to
this method.
This method is intended to be used for sending commands which are not part of the MIPI DCS
user command set. Use write_command
for commands in the user
command set.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.