From 3729608e82d1a08926760a180b52bf114ad5b73d Mon Sep 17 00:00:00 2001 From: "Jomer.Dev" Date: Mon, 8 Jan 2024 00:03:44 +0100 Subject: [PATCH] Add buffer size info to read_packet --- embassy-usb/src/class/cdc_acm.rs | 1 + 1 file changed, 1 insertion(+) 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> { } /// 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 { self.read_ep.read(data).await }