Compare commits

...

5 Commits
test ... main

View File

@ -46,8 +46,8 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
.find(|(index, ep)| {
!ep.is_allocated && max_packet_size <= ENDPOINTS_ALLOC_LAYOUT[*index]
})
.ok_or(UsbError::EndpointOverflow)?
.0;
.map(|(index, _)| index)
.ok_or(UsbError::EndpointOverflow)?;
EndpointAddress::from_parts(index, ep_dir)
}