diff options
| -rw-r--r-- | embassy-usb/src/builder.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index 6649cd5b6..cad1ecda9 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs | |||
| @@ -201,19 +201,21 @@ impl<'d, D: Driver<'d>> Builder<'d, D> { | |||
| 201 | self.config_descriptor.end_configuration(); | 201 | self.config_descriptor.end_configuration(); |
| 202 | self.bos_descriptor.end_bos(); | 202 | self.bos_descriptor.end_bos(); |
| 203 | 203 | ||
| 204 | // Log the number of allocator bytes actually used in descriptor buffers | ||
| 204 | info!("USB: device_descriptor used: {}", self.device_descriptor.position()); | 205 | info!("USB: device_descriptor used: {}", self.device_descriptor.position()); |
| 205 | info!("USB: config_descriptor used: {}", self.config_descriptor.position()); | 206 | info!("USB: config_descriptor used: {}", self.config_descriptor.position()); |
| 206 | info!("USB: bos_descriptor_buf used: {}", self.bos_descriptor.writer.position()); | 207 | info!("USB: bos_descriptor used: {}", self.bos_descriptor.writer.position()); |
| 207 | #[cfg(feature = "msos-descriptor")] | 208 | #[cfg(feature = "msos-descriptor")] |
| 208 | info!("USB: device_descriptor used: {}", msos_descriptor.len()); | 209 | info!("USB: msos_descriptor used: {}", msos_descriptor.len()); |
| 209 | if self.control_buf.len() != self.config.max_packet_size_0.into() { | 210 | if self.control_buf.len() != self.config.max_packet_size_0.into() { |
| 210 | warn!( | 211 | warn!( |
| 211 | "Mismatch in control buf and max packet size! buf len: {}, max ep0 size: {}", | 212 | "USB: Mismatch in control buf and max packet size! buf len: {}, max ep0 size: {}", |
| 212 | self.control_buf.len(), | 213 | self.control_buf.len(), |
| 213 | self.config.max_packet_size_0, | 214 | self.config.max_packet_size_0, |
| 214 | ); | 215 | ); |
| 216 | } else { | ||
| 217 | info!("USB: control_buf size: {}", self.control_buf.len()); | ||
| 215 | } | 218 | } |
| 216 | info!("USB: device_descriptor used: {}", self.config_descriptor.position()); | ||
| 217 | 219 | ||
| 218 | UsbDevice::build( | 220 | UsbDevice::build( |
| 219 | self.driver, | 221 | self.driver, |
