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

SCK, MISO, MOSI #340

Merged
merged 2 commits into from
Jul 13, 2021
Merged

SCK, MISO, MOSI #340

merged 2 commits into from
Jul 13, 2021

Conversation

burrbull
Copy link
Member

@burrbull burrbull commented Jun 6, 2021

Use only this sequence.

Related to #339.
Need decision. What we need more? Possibility to pass pins in custom sequence or more simple API.
cc @TheZoq2 @therealprof @TeXitoi @adamgreig @thalesfragoso

@burrbull
Copy link
Member Author

burrbull commented Jun 6, 2021

Also we could add advanced trait

pub trait SpiExt<SPI> {}

impl<SPI, REMAP, PINS> SpiExt<SPI> for Spi<SPI, REMAP, PINS, u8>
where
    REMAP: Remap<Periph = SPI>,
    PINS: Pins<REMAP>,
{
}

that would let write just

fn setup() -> (impl SpiExt<SPI1>, PA4<Output<PushPull>>) {

But this is rare needed case.

@TeXitoi
Copy link
Contributor

TeXitoi commented Jun 6, 2021

I'm fine with removing the free order agrument.

@pdgilbert
Copy link

FWIW, the PR is working (using Spi<SPI1, Spi1NoRemap, impl Pins<Spi1NoRemap>, u8>,) in my testing too.

@burrbull burrbull marked this pull request as ready for review July 13, 2021 13:56
@burrbull
Copy link
Member Author

bors r=TeXitoi

@bors
Copy link
Contributor

bors bot commented Jul 13, 2021

🔒 Permission denied

Existing reviewers: click here to make burrbull a reviewer

@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 13, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 13, 2021

Configuration problem:
bors.toml: not found

@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 13, 2021

I think there is no bors here.

@burrbull
Copy link
Member Author

I think there is no bors here.

Do you have permissions for manual merge?

@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 13, 2021

Yes, that's a long time I didn't to it here. rebase and merge?

@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 13, 2021

Looks more like squash and merge here.

@burrbull
Copy link
Member Author

Yes, that's a long time I didn't to it here. rebase and merge?

Just merge.

Could we add bors?

@TeXitoi TeXitoi merged commit b268a98 into stm32-rs:master Jul 13, 2021
@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 13, 2021

I have nothing against that. @TheZoq2 ?

@TheZoq2
Copy link
Member

TheZoq2 commented Jul 13, 2021

Looks like I'm late, but I have nothing against that. I'll have to learn how to use it, but that should be no problem :)

Re: merge/rebase/squash, I like to keep a linear history so I tend to squash PRs with small changes and many random commits, and rebase the rest.

@burrbull burrbull deleted the spi branch July 13, 2021 19:53
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.

4 participants