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

Use SpiDevice to control the chip select. #136

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

thejpster
Copy link
Member

Deletes the CS type param and associated field. Now we just rely on the SpiDevice we were given to control the chip select. This means we can't do the 74 cycles of card warm-up anymore - the caller will have to work out how to do that in a way that doesn't break the bus-sharing rules of SpiDevice.

Closes #126

@thejpster
Copy link
Member Author

This needs testing on a bunch of cards to ensure it works OK.

I tried a Kingston 16GB micro SDHC, and it was OK provided I did give it the 74 start-up clock cycles in my application. If I didn't do that, it returned 0 from a CMD0, and so the card was rejected by embedded-sdmmc as not working.

@thejpster
Copy link
Member Author

Wilfried tried it for me and it seemed to work on a few cards he had.

@thejpster thejpster added this pull request to the merge queue Jul 12, 2024
Merged via the queue into develop with commit 44a5736 Jul 12, 2024
8 checks passed
@thejpster thejpster deleted the use-spidevice-properly branch July 12, 2024 12:41
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.

should use SpiBus, not SpiDevice
2 participants