Remove associated buffer type from radio and pass TX buffer as slice #42
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.
This decouples the TX and RX buffer more clearly in the radio API:
associated radio type. This makes sense because the radio is only
given access to this buffer in TxRequest event, in which case it is
now handed a &[u8] rather than a custom type. It also now only has
read access to the TX buffer.
which case it really only needs a &mut [u8] to parse the packet, and
-device doesn't really change at all.
provided TX buffer slice, with a way to conveniently append to the
buffer.
There are lots of lifetime arguments being added, in order to allow the
TX buffer to be provided externally. I believe this will be useful in order to fix get_random to use
proper traits as well. There are some important performance benefits from these changes:
which is crucial for keeping async future stack usage down because the
size of the buffer will not impact the stack anymore.
managed as well, for the same reasons as above.
Although I would ideally like TX and RX to share buffer, I think that would better come in a later PR.