-
Notifications
You must be signed in to change notification settings - Fork 40
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
SPI implementation panics if read and write buffers in a transfer are not the same length #97
Comments
adamgreig
added a commit
to adamgreig/linux-embedded-hal
that referenced
this issue
Sep 25, 2023
adamgreig
added a commit
to adamgreig/linux-embedded-hal
that referenced
this issue
Sep 25, 2023
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 26, 2023
Fix #97: split unbalanced SPI transfers into rw+r or rw+w
Fixed in #98. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In embedded-hal SPI transfers, the read and write buffers may be different lengths:
In spidev read_write, it is not:
However currently we implement
transfer
by callingread_write
directly:linux-embedded-hal/src/spi.rs
Line 100 in 86ab035
leading to panics when the buffer lengths differ. We should adjust the buffers passed to
read_write
, or split the transfer into a read_write and a write or something, to accommodate.The text was updated successfully, but these errors were encountered: