My HID doesn't output the correct values - STM32

Thread Starter

theKnightWhoSaysNi

Joined Jun 7, 2018
5
I'm making a force feedback wheel with an STM32F103. So I had to learn about HID.
I made a very simple descriptor, to begin with.

I'm supposed to see the buttons count in binary in the controller visualizer but they're random.
Comparing the received value in USBlyser, when it's 0xA9, buttons 1, 4, 6, 8 are ON so I guess the µc just sends the wrong value?
Why would that be?
I've been stuck for 4 days on this

Or, do you know a good tutorial on STM32CubeIDE that would suit the case?
This website only shows the descriptor part.


I previously posted on StackOverflow if you need more info. => HERE


In usbd_custom_hid_if.c
1609272688533.png

In usbd_customhid.h
1609272845631.png

In usbd_conf.h
1609272921232.png

In main.c
1609273135910.png
and:
1609273157846.png
 
Top