USB HID right click button
Hello,
I am designing board with stm32f723 with 2 USB. On one side i have mouse attached to STM on other side STM attached to PC. When i transfer report to PC x, y and left click button works fine but i cant make right click.
Bellow is the struct of Mouse HID:
typedef struct _HID_MOUSE_Info
{
uint8_t x;
uint8_t y;
uint8_t buttons[3];
}
HID_MOUSE_Info_TypeDef;
Bellow is the Send Report:
#define CLICK_REPORT_SIZE 5
uint8_t click_report[CLICK_REPORT_SIZE] = {0};
HID_MOUSE_Info_TypeDef *Mouse_Info;
uint8_t leftclick = Mouse_Info -> buttons[0];
uint8_t rightclick = Mouse_Info -> buttons[1];
click_report[0] = leftclick; // works
click_report[1] = Mouse_Info -> x; // works
click_report[2] = Mouse_Info -> y; // works
click_report[3] = rightclick; // does not working
click_report[4] = Mouse_Info -> buttons[2]; // does not working
USBD_HID_SendReport(&hUsbDeviceFS,(uint8_t*)click_report,sizeof(CLICK_REPORT_SIZE));
