mirror of
https://github.com/yuri91/ili9341-rs.git
synced 2024-11-24 23:50:59 +00:00
Remove old Interface
trait
This commit is contained in:
parent
2b7ee112fb
commit
ea9cb59bff
1 changed files with 0 additions and 22 deletions
22
src/lib.rs
22
src/lib.rs
|
@ -12,28 +12,6 @@ use display_interface::WriteOnlyDataCommand;
|
||||||
|
|
||||||
pub mod spi;
|
pub mod spi;
|
||||||
|
|
||||||
/// Trait representing the interface to the hardware.
|
|
||||||
///
|
|
||||||
/// Intended to abstract the various buses (SPI, MPU 8/9/16-bit) from the Controller code.
|
|
||||||
pub trait Interface {
|
|
||||||
type Error;
|
|
||||||
|
|
||||||
/// Sends a command with a sequence of 8-bit arguments
|
|
||||||
///
|
|
||||||
/// Mostly used for sending configuration commands
|
|
||||||
fn write(&mut self, command: u8, data: &[u8]) -> Result<(), Self::Error>;
|
|
||||||
|
|
||||||
/// Sends a command with a sequence of 16-bit data words
|
|
||||||
///
|
|
||||||
/// Mostly used for sending MemoryWrite command and other commands
|
|
||||||
/// with 16-bit arguments
|
|
||||||
fn write_iter(
|
|
||||||
&mut self,
|
|
||||||
command: u8,
|
|
||||||
data: impl IntoIterator<Item = u16>,
|
|
||||||
) -> Result<(), Self::Error>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Trait that defines display size information
|
/// Trait that defines display size information
|
||||||
pub trait DisplaySize {
|
pub trait DisplaySize {
|
||||||
/// Width in pixels
|
/// Width in pixels
|
||||||
|
|
Loading…
Reference in a new issue