Add device protocol
This commit is contained in:
parent
3e126c9acc
commit
74bd08c9e8
2 changed files with 6 additions and 4 deletions
|
@ -13,4 +13,4 @@ panic-halt = "0.2.0"
|
||||||
defmt = "0.3.4"
|
defmt = "0.3.4"
|
||||||
usb-device = "0.2.9"
|
usb-device = "0.2.9"
|
||||||
usbd-hid = "0.6.1"
|
usbd-hid = "0.6.1"
|
||||||
critical-section = "1.1.1"
|
critical-section = "1.1.1"
|
||||||
|
|
|
@ -71,7 +71,7 @@ fn main() -> ! {
|
||||||
USB_HID = Some(HIDClass::new(
|
USB_HID = Some(HIDClass::new(
|
||||||
USB_BUS.as_ref().unwrap(),
|
USB_BUS.as_ref().unwrap(),
|
||||||
MouseReport::desc(),
|
MouseReport::desc(),
|
||||||
10,
|
60,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +81,8 @@ fn main() -> ! {
|
||||||
.manufacturer("Logitech")
|
.manufacturer("Logitech")
|
||||||
.product("Marathon Mouse/Performance Plus M705")
|
.product("Marathon Mouse/Performance Plus M705")
|
||||||
.serial_number("B14D65DA")
|
.serial_number("B14D65DA")
|
||||||
|
.device_class(0)
|
||||||
|
.device_protocol(2)
|
||||||
.build(),
|
.build(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -90,8 +92,8 @@ fn main() -> ! {
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut delay = Delay::new(core.SYST, clocks.system_clock.freq().to_Hz());
|
let mut delay = Delay::new(core.SYST, clocks.system_clock.freq().to_Hz());
|
||||||
const PIXEL: i8 = 2;
|
const PIXEL: i8 = 100;
|
||||||
const WAIT_TIME: u32 = 10000;
|
const WAIT_TIME: u32 = 1000;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
mouse_move(&mut delay, WAIT_TIME, PIXEL);
|
mouse_move(&mut delay, WAIT_TIME, PIXEL);
|
||||||
|
|
Loading…
Reference in a new issue