diff options
| -rw-r--r-- | embassy-nrf/src/usb.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-nrf/src/usb.rs b/embassy-nrf/src/usb.rs index 203f08fc0..2621e65f4 100644 --- a/embassy-nrf/src/usb.rs +++ b/embassy-nrf/src/usb.rs | |||
| @@ -363,7 +363,7 @@ unsafe fn read_dma<T: Instance>(i: usize, buf: &mut [u8]) -> Result<usize, ReadE | |||
| 363 | let regs = T::regs(); | 363 | let regs = T::regs(); |
| 364 | 364 | ||
| 365 | // Check that the packet fits into the buffer | 365 | // Check that the packet fits into the buffer |
| 366 | let size = regs.size.epout[0].read().bits() as usize; | 366 | let size = regs.size.epout[i].read().bits() as usize; |
| 367 | if size > buf.len() { | 367 | if size > buf.len() { |
| 368 | return Err(ReadError::BufferOverflow); | 368 | return Err(ReadError::BufferOverflow); |
| 369 | } | 369 | } |
