Skip to content

Dynamic recieve buffer #18

Description

@RandomInsano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions