diff --git a/src/graphics.rs b/src/graphics.rs index 9af929a..5aa5b85 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -1,4 +1,4 @@ -use crate::{Ili9341, OutputPin}; +use crate::Ili9341; use core::iter; @@ -17,7 +17,6 @@ use embedded_graphics::{ impl DrawTarget for Ili9341 where IFACE: display_interface::WriteOnlyDataCommand, - RESET: OutputPin, { type Error = display_interface::DisplayError; diff --git a/src/lib.rs b/src/lib.rs index 16a0373..b54f2a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,7 +130,12 @@ where Ok(ili9341) } +} +impl Ili9341 +where + IFACE: WriteOnlyDataCommand, +{ fn command(&mut self, cmd: Command, args: &[u8]) -> Result { self.interface.send_commands(U8Iter(&mut once(cmd as u8)))?; self.interface.send_data(U8Iter(&mut args.iter().cloned())) @@ -270,7 +275,9 @@ where self.mode = mode; Ok(()) } +} +impl Ili9341 { /// Get the current screen width. It can change based on the current orientation pub fn width(&self) -> usize { self.width