trussed-dev / usbd-ctaphid

Apache License 2.0
0 stars 3 forks source link

Extract message buffer from pipe #10

Open robin-nitrokey opened 4 months ago

robin-nitrokey commented 4 months ago

This PR extracts a Buffer struct from Pipe that takes care of message fragmentation and dispatch, while Pipe implements the USB communication. This allows us to use the message buffer in other contexts, for example for unit tests, and also makes it possible to test and fuzz its functionality directly.