aboutsummaryrefslogtreecommitdiff
path: root/embassy-usb/src/builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-usb/src/builder.rs')
-rw-r--r--embassy-usb/src/builder.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs
index 8d7abe46c..6fc2a5a22 100644
--- a/embassy-usb/src/builder.rs
+++ b/embassy-usb/src/builder.rs
@@ -5,7 +5,7 @@ use crate::descriptor::{BosWriter, DescriptorWriter, SynchronizationType, UsageT
5use crate::driver::{Driver, Endpoint, EndpointAddress, EndpointInfo, EndpointType}; 5use crate::driver::{Driver, Endpoint, EndpointAddress, EndpointInfo, EndpointType};
6use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter}; 6use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter};
7use crate::types::{InterfaceNumber, StringIndex}; 7use crate::types::{InterfaceNumber, StringIndex};
8use crate::{Handler, Interface, UsbDevice, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START}; 8use crate::{Handler, Interface, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START, UsbDevice};
9 9
10#[derive(Debug, Copy, Clone)] 10#[derive(Debug, Copy, Clone)]
11#[cfg_attr(feature = "defmt", derive(defmt::Format))] 11#[cfg_attr(feature = "defmt", derive(defmt::Format))]
@@ -176,7 +176,9 @@ impl<'d, D: Driver<'d>> Builder<'d, D> {
176 if config.composite_with_iads 176 if config.composite_with_iads
177 && (config.device_class != 0xEF || config.device_sub_class != 0x02 || config.device_protocol != 0x01) 177 && (config.device_class != 0xEF || config.device_sub_class != 0x02 || config.device_protocol != 0x01)
178 { 178 {
179 panic!("if composite_with_iads is set, you must set device_class = 0xEF, device_sub_class = 0x02, device_protocol = 0x01"); 179 panic!(
180 "if composite_with_iads is set, you must set device_class = 0xEF, device_sub_class = 0x02, device_protocol = 0x01"
181 );
180 } 182 }
181 183
182 assert!( 184 assert!(
@@ -337,7 +339,8 @@ impl<'a, 'd, D: Driver<'d>> FunctionBuilder<'a, 'd, D> {
337 num_alt_settings: 0, 339 num_alt_settings: 0,
338 }; 340 };
339 341
340 assert!(self.builder.interfaces.push(iface).is_ok(), 342 assert!(
343 self.builder.interfaces.push(iface).is_ok(),
341 "embassy-usb: interface list full. Increase the `max_interface_count` compile-time setting. Current value: {}", 344 "embassy-usb: interface list full. Increase the `max_interface_count` compile-time setting. Current value: {}",
342 MAX_INTERFACE_COUNT 345 MAX_INTERFACE_COUNT
343 ); 346 );