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

Add methods to select and deselect SPI slaves #258

Closed
wants to merge 2 commits into from
Closed

Add methods to select and deselect SPI slaves #258

wants to merge 2 commits into from

Conversation

hannobraun
Copy link
Member

Based on #256. I recommend reviewing/merging that one first.

@hannobraun
Copy link
Member Author

Hold on, this is not quite right. It turns out that you can't deselect a slave using the method provided here. You do so by setting EOT (end of transfer) in TXCTL or TXDATCTL.

This might mean that we can't provide this feature and implement spi::FullDuplex at the same time, as there's no way for FullDuplex::send to know that it's writing the last byte. And setting EOT in a separate method will not take effect until we write another word, and would be of no use to a driver anyway.

Probably best to close this PR and handle slave select via GPIO (which I think drivers in the wild already do).

@hannobraun
Copy link
Member Author

I'm closing this pull request, as I suggested in my previous comment. It's partially wrong and largely unnecessary in master mode. I've incorporated the parts of it required for slave mode into my WIP branch.

@hannobraun hannobraun closed this Jul 20, 2020
@hannobraun hannobraun deleted the spi-select branch July 20, 2020 11:44
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