Hi
I've found this topic really instructive because I would like to do the same with the joystick sample.
I would like to add the way to send custom data throught a MFC to change some parameters.
My descriptor works perfectly it is based on the microchip library.
But I don't really understand how to add the specific vendor frame
I would like to add a simple example in feature mode.
0x09, 0x01, // Usage ID (vendor defined)
0xA1, 0x01, // Collection (application)
0x09, 0x05, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95, 0x02, // Report Count (2 fields)
0xB1, 0x02, // Feature (Data, Variable, Absolute)
0xC0
I don't really understand where to add it in my descriptor
I've done this but the joystick doesn't work
ROM struct{BYTE report[HID_RPT01_SIZE];}hid_rpt01={
0x05,0x01, //USAGE_PAGE (Generic Desktop)
0x09,0x05, //USAGE (Game Pad)
0xA1,0x01, //COLLECTION (Application)
0x15,0x00, // LOGICAL_MINIMUM(0)
0x25,0x01, // LOGICAL_MAXIMUM(1)
0x35,0x00, // PHYSICAL_MINIMUM(0)
0x45,0x01, // PHYSICAL_MAXIMUM(1)
0x75,0x01, // REPORT_SIZE(1)
0x95,0x08, // REPORT_COUNT(5)
0x05,0x09, // USAGE_PAGE(Button)
0x19,0x01, // USAGE_MINIMUM(Button 1)
0x29,0x08, // USAGE_MAXIMUM(Button 5)
0x81,0x02, // INPUT(Data,Var,Abs)
0x05,0x01, //USAGE_PAGE (Generic Desktop)
0x26,0xFF,0x00, // LOGICAL_MAXIMUM(255)
0x46,0xFF,0x00, // PHYSICAL_MAXIMUM(255)
0x09,0x30, // USAGE(X)
0x09,0x31, // USAGE(Y)
0x09,0x32, // USAGE(Z)
0x09,0x35, // USAGE(Rz)
0x75,0x08, // REPORT_SIZE(8)
0x95,0x04, // REPORT_COUNT(4)
0x81,0x02, // INPUT(Data,Var,Abs)
0xC0, //END_COLLECTION
// 0x06, 0xA0, 0xFF, // Usage page (vendor defined)
0x09, 0x01, // Usage ID (vendor defined)
0xA1, 0x01, // Collection (application)
0x09, 0x05, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95, 0x02, // Report Count (2 fields)
0xB1, 0x02, // Feature (Data, Variable, Absolute)
0xC0
};
Thanks you