rust-embedded-community / usb-device

Experimental device-side USB framework for microcontrollers in Rust.
MIT License
451 stars 76 forks source link

Simplify control buffer sizing #90

Closed ryan-summers closed 2 years ago

ryan-summers commented 2 years ago

Currently, the control buffer is either 128 or 256 bytes. However, it has been seen that these static allocations can sometimes be confusing (see https://github.com/rust-embedded-community/usb-device/issues/85).

There are a few options here:

  1. Use const-generics to configure the control buffer size
  2. Use an approach similar to smoltcp's managed crate to allow the user to provide a buffer to use instead, which avoids const-generic parameter bloat.
ryan-summers commented 2 years ago

Woops, I should refer to already-created issues before making new ones. This is tracked in https://github.com/rust-embedded-community/usb-device/issues/31