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

Dynamic recieve buffer #18

Open
RandomInsano opened this issue May 26, 2019 · 0 comments
Open

Dynamic recieve buffer #18

RandomInsano opened this issue May 26, 2019 · 0 comments

Comments

@RandomInsano
Copy link
Owner

I believe with the advent of Rust 1.35.0 stabalization of unsized_locals it should be possible to create variable length arrays.

Now, the second byte back from the controller includes it's type and the number of shorts (two-byte integers) the controller will be returning. The work item here is to speed up communication by creating a buffer for the exact number of return bytes the controller will be sending. As it stands right now, it's asking for 32 bytes each round.

This is the code that will need changing. The SPI chip select line toggles between each call, so I'm unsure what affect this will have on the controllers. It may be that the two calls (one for the request header, the second for the response data) may not be possible without a chip select line manually being toggled by the library.

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

No branches or pull requests

1 participant