Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3882

General • Re: TinyUSB Host question

$
0
0
Someone did a mouse HID with absolute mouse positioning with an Arduino / AVR:

https://github.com/jonathanedgecombe/absmouse

In that project, the X and Y is no longer declared as relative positions in the descriptor, see HID_REPORT_DESCRIPTOR in AbsMouse.cpp. I dunno about compatibility though...

For common mouse, if there are no HID report sent, it means that X and Y hasn't changed. The USB mouse still has to send a keep alive every 1 ms. It' s just there is no state change to report, so just a keepalive is sent and arguably the keepalive means deltaX=0 and deltaY=0. So one can presumably use some flags with 1 ms timer ticks to determine whether a mouse is at rest.

See this very informative discussion on what is being transmitted:

https://www.usbmadesimple.co.uk/ums_5.htm

And here is the HID 1.11 PDF in case anyone wants to read it:

https://usb.org/document-library/device ... on-hid-111

Statistics: Posted by katak255 — Wed Sep 04, 2024 3:09 am



Viewing all articles
Browse latest Browse all 3882

Trending Articles