Some testing to get it working on W10

This commit is contained in:
hodasemi 2023-02-02 08:24:59 +01:00
parent 54bb7db8dc
commit e0595c1da8

View file

@ -71,16 +71,19 @@ fn main() -> ! {
USB_HID = Some(HIDClass::new(
USB_BUS.as_ref().unwrap(),
MouseReport::desc(),
60,
10,
));
}
unsafe {
USB_DEVICE = Some(
UsbDeviceBuilder::new(USB_BUS.as_ref().unwrap(), UsbVidPid(0x046d, 0x101b))
.manufacturer("Logitech")
.product("Marathon Mouse/Performance Plus M705")
.serial_number("B14D65DA")
UsbDeviceBuilder::new(USB_BUS.as_ref().unwrap(), UsbVidPid(0x6666, 0x0789))
// .manufacturer("Logitech")
// .product("Marathon Mouse/Performance Plus M705")
// .serial_number("B14D65DA")
.manufacturer("KOBA789")
.product("RustyKeys")
.serial_number("789")
.build(),
);
}
@ -99,6 +102,17 @@ fn main() -> ! {
}
}
#[allow(unused)]
fn reworked_mouse_descriptor() -> &'static [u8] {
&[
5, 1, 9, 2, 161, 1, 9, 1, 161, 0, 5, 9, 25, 1, 41, 8, 21, 0, 37, 1, 117, 1, 149, 8,
// add usage vendor here manually
9, 2, // Input starts here
129, 2, 5, 1, 9, 48, 23, 129, 255, 255, 255, 37, 127, 117, 8, 149, 1, 129, 6, 9, 49, 129,
6, 9, 56, 129, 6, 5, 12, 10, 56, 2, 129, 6, 192, 192,
]
}
fn mouse_move(delay: &mut Delay, wait_time: u32, v: i8) {
delay.delay_ms(wait_time);