aboutsummaryrefslogtreecommitdiff
path: root/embassy-usb/src/class
diff options
context:
space:
mode:
authorJomer.Dev <[email protected]>2024-01-08 00:03:44 +0100
committerJomer.Dev <[email protected]>2024-01-08 00:03:44 +0100
commit3729608e82d1a08926760a180b52bf114ad5b73d (patch)
treebadb8dcb361e8d65793becc60feeb65b6a3f3cde /embassy-usb/src/class
parent8e7f477b01507044471b0b247aea1db52716a765 (diff)
Add buffer size info to read_packet
Diffstat (limited to 'embassy-usb/src/class')
-rw-r--r--embassy-usb/src/class/cdc_acm.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-usb/src/class/cdc_acm.rs b/embassy-usb/src/class/cdc_acm.rs
index f1066d2f2..2823e522e 100644
--- a/embassy-usb/src/class/cdc_acm.rs
+++ b/embassy-usb/src/class/cdc_acm.rs
@@ -439,6 +439,7 @@ impl<'d, D: Driver<'d>> Receiver<'d, D> {
439 } 439 }
440 440
441 /// Reads a single packet from the OUT endpoint. 441 /// Reads a single packet from the OUT endpoint.
442 /// Must be called with a buffer large enough to hold max_packet_size bytes.
442 pub async fn read_packet(&mut self, data: &mut [u8]) -> Result<usize, EndpointError> { 443 pub async fn read_packet(&mut self, data: &mut [u8]) -> Result<usize, EndpointError> {
443 self.read_ep.read(data).await 444 self.read_ep.read(data).await
444 } 445 }