Compare commits

...

1 Commits
main ... test

Author SHA1 Message Date
doryan f7c4b48b85 remove free-interrupt context for endpoint allocator 2025-05-05 23:09:54 +04:00

View File

@ -24,7 +24,6 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
_interval: u8,
) -> UsbResult<EndpointAddress> {
// Handle first endpoint. //
free(|_cs| {
if ep_addr == Some(EndpointAddress::from_parts(0, UsbDirection::In)) {
Ok(ep_addr.unwrap())
} else {
@ -40,8 +39,7 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
.enumerate()
.skip(1)
.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)?
.0;
@ -77,7 +75,6 @@ impl<const L: usize> UsbBus for UsbDevice<L> {
Ok(address)
}
}
})
}
fn enable(&mut self) {