E4dev
Member

Posts: 6
|
 |
« on: January 09, 2012, 09:20:27 pm » |
|
Y'all: I am writing an application for a ST Cortex M3 processor that uses HID interrupt transfers to send information to the device from Windows. I do not seem to be able to use different sizes for the reports, even though each report has a different reportid. Windows signals an error for every write with a size not equal the size of the largest OUT report in my table. Different sizes in IN and OUT Ep's seem to work. Is that normal behavior or is it related to my report definition (see below). const uint8_t CustomHID_ReportDescriptor[CUSTOMHID_SIZ_REPORT_DESC] = { 0x06, 0x00, 0xFF, /* USAGE_PAGE (Vendor Page: 0xFF00) */ 0x09, 0x01, /* USAGE (Demo Kit) */ 0x15, 0x00, /* LOGICAL_MINIMUM (0) */ 0x26, 0x7f, 0x00, /* LOGICAL_MAXIMUM (1) */
/* 12 */ 0xa1, 0x01, /* Application Collection */ /* Erase */ 0x85, BL_OUT_REPORT_ERASE, /* REPORT_ID (2) */ 0x75, CUSTOMHID_REPORTSIZE_8BIT, /* REPORT_SIZE ( */ 0x95, BL_MSG_CNT_ERASE, /* REPORT_COUNT (1) */ 0x09, 0x01, /* USAGE */ 0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
/* Prog hex record */ 0x85, BL_OUT_REPORT_PROGHEX, /* REPORT_ID (3) */ 0x75, CUSTOMHID_REPORTSIZE_8BIT, /* REPORT_SIZE ( */ 0x95, BL_MSG_CNT_PROGHEX, /* REPORT_COUNT (1) */ 0x09, 0x02, /* USAGE */ 0x91, 0x82, /* OUTPUT (Data,Var,Abs,Vol) */
/* Status */ 0x85, BL_IN_REPORT_STATUS, /* REPORT_ID (7) */ 0x75, CUSTOMHID_REPORTSIZE_8BIT, /* REPORT_SIZE ( */ 0x95, BL_MSG_CNT_STATUS, 0x09, 0x03, /* USAGE */ 0x81, 0x82, /* INPUT (Data,Var,Abs,Vol) */ 0xc0 }; /* CustomHID_ReportDescriptor */Thanks, HJ
|
|
|
|
|
Logged
|
|
|
|