2020-10-26 08:22 AM
I am using STM32f3 discovery kit with STM32 cube ide to interface the kit as USB HID mouse. I am trying to change the resolution of the mouse. The default resolution given in the Report descriptor is 400 dpi . (0x15, 0x81, // LOGICAL_MINIMUM (-127)- 0x81
0x25, 0x7f, // LOGICAL_MAXIMUM (127)- 0x7f
It is possible to change the value of the report descriptor to increase the resolution of the USB HID mouse.
2020-11-03 02:41 AM
@Community member Please can you give any tips on this problem
2020-11-03 10:40 AM
Not really a USB/HID expert. Check that the endian order is correct, that the descriptor has right number of bytes, checksums, etc.
2020-11-04 01:26 AM
The endian order is correct.
uint8_t mousebuffer[4];
mousebuffer[0]=0; // Left and right click (0: None, 1: Left click, 2: Right Click
mousebuffer[1]=0; // X movement 0:, not moving, +ve : Right movement ,-ve :left movement
mousebuffer[2]=0; // Y movement 0: not moving ,+ve : Down movement ,-ve :up movement
mousebuffer[3]=0; // Scroll 0: not moving ,+ve : Up movement, -ve :Down movement
USBD_HID_SendReport(&hUsbDeviceFS,mousebuffer,4);
The mousebuffer declaration is uint8_t which limit the range to -127 to 127 for max. and min. value of the x axis and y axis movement of the mouse which is also specified in the report descriptor . I want to define the mouse buffer to uint16_t to increase the range of x and y movement which will increase the resolution of the USB HID mouse . I tried to change the defination in the USB library but could not get any solution.
Can the hardware support this changes on the library to increase the resolution of the USB HID mouse??
2020-11-04 01:41 AM
@Yohann M. Please can you give any tips on this problem
2020-11-04 07:19 PM
> The mousebuffer declaration is uint8_t which limit the range to -127 to 127 f
You can define the HID report descriptor so that the number of bits for X,Y is larger.
For example 16 x 16 or 12 x 12.
Find any mice with high resolution, copy their descriptor and study.
Of course, if X or Y do not fit in one byte, the mouse is not legacy-compatible.
-- pa