ON 20070429@9:23:18 AM at page: http://www.piclist.com/microchip/language/cs.htm#39195.7584837963 James Newton[JMN-EFP-786] published post 39195.7584837963 quinton.smit@baesystems.com asks:
I am having difficulty in changing the report count to 64 bytes as this is the maximum size of the data packet sent over the usb from my host software. If I change the Report Count to 64 the usb still enumerates but does not send any data. Here is my code....Any suggestions?|Delete 'P-' before: '' but after: '
Q
/**************HID*********************************/
#define HID_INTF_ID 0x00
#define HID_UEP UEP1
#define HID_BD_OUT ep1Bo
#define HID_INT_OUT_EP_SIZE 8
#define HID_BD_IN ep1Bi
#define HID_INT_IN_EP_SIZE 8
#define HID_NUM_OF_DSC 1
#define HID_RPT01_SIZE 24
// The number of bytes in each report calculated from Report Size and Report Count //in the report descriptor:
#define HID_INPUT_REPORT_BYTES 64
#define HID_OUTPUT_REPORT_BYTES 64
#define HID_FEATURE_REPORT_BYTES 64
*********************************************************************
rom struct{byte report[HID_RPT01_SIZE];}hid_rpt01={
0x06, 0xA0, 0xFF, // Usage page (vendor defined)
0x09, 0x01, // Usage ID (vendor defined)
0xA1, 0x01, // Collection (application)
// The Input report
0x09, 0x03, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95, 0x08, // Report Count (8 fields)
0x81, 0x02, // Input (Data, Variable, Absolute)
// The Output report
0x09, 0x04, // Usage ID - vendor defined
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8 bits)
0x95, 0x08, // Report Count (8 fields)
0x91, 0x02, // Output (Data, Variable, Absolute)
// The Feature report
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}; // end collection