Compare commits

...

5 Commits
test ... main

View File

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