usb: make max interface count configurable at compile time.

This commit is contained in:
Dario Nieuwenhuis
2023-02-07 20:49:10 +01:00
parent 4a224efe75
commit 1d841cc8ac
6 changed files with 212 additions and 5 deletions

View File

@ -308,7 +308,10 @@ impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D> {
};
if self.builder.interfaces.push(iface).is_err() {
panic!("max interface count reached")
panic!(
"embassy-usb: interface list full. Increase the `max_interface_count` compile-time setting. Current value: {}",
MAX_INTERFACE_COUNT
)
}
InterfaceBuilder {