Skip to content

Commit 0a5e2c4

Browse files
committed
Revert "new maybe_push_input() method"
This reverts commit c1210a9. (twitchyliquid64#34) This commit breaks the build since it attempts to use `EndpointIn` methods from a PR that were never landed in the usb-device crate: rust-embedded-community/usb-device#78
1 parent c1210a9 commit 0a5e2c4

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/hid_class.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -408,24 +408,6 @@ impl<B: UsbBus> HIDClass<'_, B> {
408408
}
409409
}
410410

411-
pub fn maybe_push_input<'a, IR: AsInputReport>(
412-
&self,
413-
mut producer: impl FnMut() -> IR,
414-
) -> Option<Result<usize>> {
415-
if let Some(ep) = &self.in_ep {
416-
let mut buff: [u8; 64] = [0; 64];
417-
ep.maybe_write(|| {
418-
let size = match serialize(&mut buff, &producer()) {
419-
Ok(l) => l,
420-
Err(_) => return Err(UsbError::BufferOverflow),
421-
};
422-
Ok(&buff[0..size])
423-
})
424-
} else {
425-
Some(Err(UsbError::InvalidEndpoint))
426-
}
427-
}
428-
429411
/// Tries to write an input (device-to-host) report from the given raw bytes.
430412
/// Data is expected to be a valid HID report for INPUT items. If report ID's
431413
/// were used in the descriptor, the report ID corresponding to this report

0 commit comments

Comments
 (0)