diff --git a/embassy-usb-hid/src/lib.rs b/embassy-usb-hid/src/lib.rs index e29d485f..996de6a5 100644 --- a/embassy-usb-hid/src/lib.rs +++ b/embassy-usb-hid/src/lib.rs @@ -252,6 +252,7 @@ impl<'d, D: Driver<'d>, const N: usize> ReportReader<'d, D, N> { /// `read()`. If the dropped future used the same `buf`, then `buf` will /// contain the full report. pub async fn read(&mut self, buf: &mut [u8]) -> Result { + assert!(N != 0); assert!(buf.len() >= N); // Read packets from the endpoint