This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

HID USB support 16 bit X-axis and Y-axis

I came across the SDK document below:
For the mouse protocol, one 4-byte input report is defined:
BYTE[0]: Button state bit field.
BYTE[1]: Signed 8-bit X-axis offset since the last position.
BYTE[2]: Signed 8-bit Y-axis offset since the last position.
BYTE[3]: signed 8-bit Wheel offset since the last position.

By using the Generic HID USB instance how do I extend this 4 bytes to 6 bytes reporting to support 16 bit X-axis and Y-axis?

  • currently I am trying to get this Report Descriptor to work but it still reports 4 bytes instead of 8 bytes.

  • How to properly post source code (or any other text which requires/benefits from a mono-spaced font):

  • It does not quite help, what I need is for the X-axis and Y-axis of mouse reporting to be 16 bits instead of the default 8 bits. This 16 bits are reported count (upper and lower bytes) and not like in your document left X-axis and right X-axis. 

    Further more build is ok but when running it on the nRF52840 dongle, the USB still reports 4 bytes (button, X-axis, Y-axis and z-wheel). Each one byte making up the 4 bytes.

  • thanks for this tips.

1 2