Added new HID_DESCRIPTOR_MOUSE, HID_DESCRIPTOR_KEYBOARD and HID_DESCRIPTOR_JOYSTICK macros for easy automatic creation of basic USB HID device reports.
This commit is contained in:
1 parent
6d67b1df3c
commit
6c7ed7ecd6
12 files changed
+208
-213
No files matched your search
@@ -233,10 +233,10 @@ void CreateMouseReport(USB_MouseReport_Data_t* const ReportData)
|
||||
if (JoyStatus_LCL & JOY_LEFT)
|
||||
ReportData->X = -1;
|
||||
else if (JoyStatus_LCL & JOY_RIGHT)
|
||||
ReportData->X = 1;
|
||||
ReportData->X = 1;
|
||||
|
||||
if (JoyStatus_LCL & JOY_PRESS)
|
||||
ReportData->Button = (1 << 0);
|
||||
ReportData->Button |= (1 << 0);
|
||||
|
||||
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
|
||||
ReportData->Button |= (1 << 1);
|
||||
|
||||
Reference in new issue
Block a user