From ab0d5e097dfc09903822fc0150557ce857b7d2a9 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 19 Jan 2026 00:17:42 +0800 Subject: [PATCH] Use SpiBus instead of SpiDevice It manages the chip select by itself, easier to use. Signed-off-by: Daniel Schaefer --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 96b1f48..70a65f8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,7 @@ use crate::instruction::Instruction; use embedded_hal::delay::DelayNs; use embedded_hal::digital::OutputPin; -use embedded_hal::spi::SpiDevice; +use embedded_hal::spi::SpiBus; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum PowerMode { @@ -157,7 +157,7 @@ pub enum Orientation { impl ST7306 where - SPI: SpiDevice, + SPI: SpiBus, DC: OutputPin, CS: OutputPin, RST: OutputPin, @@ -706,7 +706,7 @@ fn col_to_bright(color: Rgb565) -> u8 { impl DrawTarget for ST7306 where - SPI: SpiDevice, + SPI: SpiBus, DC: OutputPin, CS: OutputPin, RST: OutputPin, @@ -781,7 +781,7 @@ where impl OriginDimensions for ST7306 where - SPI: SpiDevice, + SPI: SpiBus, DC: OutputPin, CS: OutputPin, RST: OutputPin,