Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Spi::new documentation #702

Merged
merged 1 commit into from
Oct 24, 2023
Merged
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
5 changes: 5 additions & 0 deletions rp2040-hal/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ impl<S: State, D: SpiDevice, P: ValidSpiPinout<D>, const DS: u8> Spi<S, D, P, DS
impl<D: SpiDevice, P: ValidSpiPinout<D>, const DS: u8> Spi<Disabled, D, P, DS> {
/// Create new not initialized Spi bus. Initialize it with [`.init`][Self::init]
/// or [`.init_slave`][Self::init_slave].
///
/// Valid pin sets are in the form of `(Tx, Sck)` or `(Tx, Rx, Sck)`
///
/// If you pins are dynamically identified (`Pin<DynPinId, _, _>`) they will first need to pass
/// validation using their corresponding [`ValidatedPinXX`](ValidatedPinTx).
pub fn new(device: D, pins: P) -> Spi<Disabled, D, P, DS> {
Spi {
device,
Expand Down
Loading