Skip to content

Use SpiBus instead of SpiDevice#5

Closed
JohnAZoidberg wants to merge 1 commit intomainfrom
spi-bus
Closed

Use SpiBus instead of SpiDevice#5
JohnAZoidberg wants to merge 1 commit intomainfrom
spi-bus

Conversation

@JohnAZoidberg
Copy link
Member

@JohnAZoidberg JohnAZoidberg commented Jan 18, 2026

Let the caller manage chip select.

It manages the chip select by itself, easier to use.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg JohnAZoidberg requested a review from Copilot January 18, 2026 16:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ST7306 driver to use SpiBus instead of SpiDevice from the embedded-hal crate, allowing the driver to manage chip select internally for easier usage.

Changes:

  • Updated the SPI trait bound from SpiDevice to SpiBus across all generic implementations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.
@JohnAZoidberg
Copy link
Member Author

Looking at the docs again: https://rtic.rs/dev/api/embedded_hal/spi/index.html#for-driver-authors
Actually I don't want this, I do have a spi chipselect pin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant