Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -157,7 +157,7 @@ pub enum Orientation {

impl<SPI, DC, CS, RST, const COLS: usize, const ROWS: usize> ST7306<SPI, DC, CS, RST, COLS, ROWS>
where
SPI: SpiDevice,
SPI: SpiBus,
DC: OutputPin,
CS: OutputPin,
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CS (chip select) pin is still required as a generic parameter and trait bound, but SpiBus manages chip select internally. Consider removing the CS generic parameter and OutputPin trait bound for CS, as they are no longer needed with SpiBus.

Suggested change
CS: OutputPin,

Copilot uses AI. Check for mistakes.
RST: OutputPin,
Expand Down Expand Up @@ -706,7 +706,7 @@ fn col_to_bright(color: Rgb565) -> u8 {
impl<SPI, DC, CS, RST, const COLS: usize, const ROWS: usize> DrawTarget
for ST7306<SPI, DC, CS, RST, COLS, ROWS>
where
SPI: SpiDevice,
SPI: SpiBus,
DC: OutputPin,
CS: OutputPin,
RST: OutputPin,
Expand Down Expand Up @@ -781,7 +781,7 @@ where
impl<SPI, DC, CS, RST, const COLS: usize, const ROWS: usize> OriginDimensions
for ST7306<SPI, DC, CS, RST, COLS, ROWS>
where
SPI: SpiDevice,
SPI: SpiBus,
DC: OutputPin,
CS: OutputPin,
RST: OutputPin,
Expand Down