Draft
Conversation
added 3 commits
September 28, 2020 02:18
Contributor
|
Looks great to me! Perhaps return the buffers aswell in |
kalkyl
reviewed
Sep 28, 2020
| mut rx_buffer: RxB, | ||
| ) -> Result<TransferSplit<T, TxB, RxB>, (Self, Error)> | ||
| where | ||
| TxB: ReadBuffer<Word = TxW>, |
Contributor
There was a problem hiding this comment.
Suggested change
| TxB: ReadBuffer<Word = TxW>, | |
| TxB: ReadBuffer<Word = TxW> + 'static, |
Based on the matrix channel discussion today it looks like we need + 'static bounds on these buffers aswell
| ) -> Result<TransferSplit<T, TxB, RxB>, (Self, Error)> | ||
| where | ||
| TxB: ReadBuffer<Word = TxW>, | ||
| RxB: WriteBuffer<Word = RxW>, |
Contributor
There was a problem hiding this comment.
Suggested change
| RxB: WriteBuffer<Word = RxW>, | |
| RxB: WriteBuffer<Word = RxW> + 'static, |
richard-uk1
reviewed
Mar 11, 2021
| // | ||
| // This event is triggered once both transmitting and receiving are | ||
| // done. | ||
| while !self.is_spi_dma_transfer_complete() {} |
There was a problem hiding this comment.
Is there an alternative to spinning here: could we setup an interrupt and go to sleep? I'm not an expert at all so apologies if this is a silly suggestion.
|
I'm trying to use this SPI master abstraction, but am struggling because power consumption is very important and I can't see a way to disable the SPI in the current API. This patch would solve the problem for me I think. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CC @kalkyl, also fixed a SPIS item