expose max_packet_size of OP endpoint to application

This commit is contained in:
2026-08-25 12:31:42 -07:00
parent 53ce6a1229
commit 45550aefbe
+6
View File
@@ -1385,6 +1385,12 @@ impl<'a, B: UsbBus, AU: AudioHandler<'a, B> + ClockSource> UsbAudioClass<'a, B,
} }
} }
} }
pub fn max_read_packet_size(&self) -> core::result::Result<u16, UsbAudioClassError> {
match self.output.as_ref() {
Some(output) => Ok(output.endpoint.max_packet_size()),
None => Err(UsbAudioClassError::Other),
}
}
} }
/// Set up a `UsbDeviceBuilder` with the device IDs for Usb Audio Class 2.0 /// Set up a `UsbDeviceBuilder` with the device IDs for Usb Audio Class 2.0