From 74bd08c9e8c2c661da3c5ffcef0f419c639c82d7 Mon Sep 17 00:00:00 2001 From: hodasemi Date: Thu, 6 Apr 2023 19:10:12 +0200 Subject: [PATCH] Add device protocol --- Cargo.toml | 2 +- src/main.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 631c945..5e44323 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,4 +13,4 @@ panic-halt = "0.2.0" defmt = "0.3.4" usb-device = "0.2.9" usbd-hid = "0.6.1" -critical-section = "1.1.1" \ No newline at end of file +critical-section = "1.1.1" diff --git a/src/main.rs b/src/main.rs index ba9c3d1..ccfc9b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,7 +71,7 @@ fn main() -> ! { USB_HID = Some(HIDClass::new( USB_BUS.as_ref().unwrap(), MouseReport::desc(), - 10, + 60, )); } @@ -81,6 +81,8 @@ fn main() -> ! { .manufacturer("Logitech") .product("Marathon Mouse/Performance Plus M705") .serial_number("B14D65DA") + .device_class(0) + .device_protocol(2) .build(), ); } @@ -90,8 +92,8 @@ fn main() -> ! { } let mut delay = Delay::new(core.SYST, clocks.system_clock.freq().to_Hz()); - const PIXEL: i8 = 2; - const WAIT_TIME: u32 = 10000; + const PIXEL: i8 = 100; + const WAIT_TIME: u32 = 1000; loop { mouse_move(&mut delay, WAIT_TIME, PIXEL);