Add buffer size info to read_packet

This commit is contained in:
Jomer.Dev 2024-01-08 00:03:44 +01:00
parent 8e7f477b01
commit 3729608e82

View File

@ -439,6 +439,7 @@ impl<'d, D: Driver<'d>> Receiver<'d, D> {
} }
/// Reads a single packet from the OUT endpoint. /// Reads a single packet from the OUT endpoint.
/// Must be called with a buffer large enough to hold max_packet_size bytes.
pub async fn read_packet(&mut self, data: &mut [u8]) -> Result<usize, EndpointError> { pub async fn read_packet(&mut self, data: &mut [u8]) -> Result<usize, EndpointError> {
self.read_ep.read(data).await self.read_ep.read(data).await
} }