Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f7c4b48b85 |
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue