diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-02-07 20:49:10 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-02-08 00:16:04 +0100 |
| commit | 1d841cc8ac74feacc4d231958ce2c46419ae3bda (patch) | |
| tree | 44dbe827369eceb661c287d2c47ea17f00878c11 /embassy-usb/src/builder.rs | |
| parent | 4a224efe75c7986f5b3d8c5d6083fa17cb774f12 (diff) | |
usb: make max interface count configurable at compile time.
Diffstat (limited to 'embassy-usb/src/builder.rs')
| -rw-r--r-- | embassy-usb/src/builder.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index d1cbf674b..d89fc4017 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs | |||
| @@ -308,7 +308,10 @@ impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D> { | |||
| 308 | }; | 308 | }; |
| 309 | 309 | ||
| 310 | if self.builder.interfaces.push(iface).is_err() { | 310 | if self.builder.interfaces.push(iface).is_err() { |
| 311 | panic!("max interface count reached") | 311 | panic!( |
| 312 | "embassy-usb: interface list full. Increase the `max_interface_count` compile-time setting. Current value: {}", | ||
| 313 | MAX_INTERFACE_COUNT | ||
| 314 | ) | ||
| 312 | } | 315 | } |
| 313 | 316 | ||
| 314 | InterfaceBuilder { | 317 | InterfaceBuilder { |
