Page 1 of 1

USB_BUFSIZE limited to 8?

Posted: Thu Aug 20, 2015 10:50 pm
by ulao
Can this be changed?

#define USB_BUFSIZE 11 /* PID, 8 bytes data, 2 bytes CRC */

Because I want to support this in usbFunctionWrite?

Code: Select all

 0x09,0x68,    //    Usage Custom Force Data Rep...
   0xA1,0x02,    //    Collection Datalink
      0x85,0x07,         //    Report ID 7
      0x09,0x22,         //    Usage Effect Block Index
      0x15,0x01,         //    Logical Minimum 1
      0x25,0x28,         //    Logical Maximum 28h (40d)
      0x35,0x01,         //    Physical Minimum 1
      0x45,0x28,         //    Physical Maximum 28h (40d)
      0x75,0x08,         //    Report Size 8
      0x95,0x01,         //    Report Count 1
      0x91,0x02,         //    Output (Variable)
      0x09,0x6C,         //    Usage Custom Force Data Offset
      0x15,0x00,         //    Logical Minimum 0
      0x26,0x10,0x27,    //    Logical Maximum 2710h (10000d)
      0x35,0x00,         //    Physical Minimum 0
      0x46,0x10,0x27,    //    Physical Maximum 2710h (10000d)
      0x75,0x10,         //    Report Size 10h (16d)
      0x95,0x01,         //    Report Count 1
      0x91,0x02,         //    Output (Variable)
      0x09,0x69,         //    Usage Custom Force Data
      0x15,0x81,         //    Logical Minimum 81h (-127d)
      0x25,0x7F,         //    Logical Maximum 7Fh (127d)
      0x35,0x00,         //    Physical Minimum 0
      0x46,0xFF,0x00,    //    Physical Maximum FFh (255d)
      0x75,0x08,         //    Report Size 8
      0x95,0x0C,         //    Report Count Ch (12d)
      0x92,0x02,0x01,    //       Output (Variable, Buffered)
   0xC0     ,    //    End Collection


I get 12 bytes of data here and its truncated by 8 because of this. changing the value to 14 didn't help because it seems to be a coded limit in the asm. Is this a USB low speed limitation?

Looks like this page talks about it but not sure what main file they are referring to and it seems more about the read function then write.
http://codeandlife.com/2012/02/24/v-usb ... ctionread/