cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying Custom HID Application

prt
Associate
Posted on October 05, 2013 at 22:03

Hi;

I am working on the Custom HID application which is in the St library and I use STM3210E-EVAL.  But this protocol transfer only 2 bytes (1 Byte Id + 1 Byte Data) so I modified the code and I transferred the 64 bytes from host (pc) to device (eval board) but I didn't send more than 2 bytes from device to host.Finally, I want to send 64 bytes from device to host. Can you help me?

These are my changings ;

at usb_prop.c

    ....

  SetEPTxCount(ENDP1, 2);     -->          SetEPTxCount(ENDP1, 64);

  SetEPRxCount(ENDP1, 2);     -->          SetEPRxCount(ENDP1, 64);

    ....

at usb_desc.c

const uint8_t CustomHID_ConfigDescriptor[CUSTOMHID_SIZ_CONFIG_DESC] =

  {

    ....

    ....

    0x02  changed to 0x40  /*vMaxpacketsize endpoint address IN*/

    ....

    ....

    0x02  changed to 0x40  /*vMaxpacketsize endpoint address OUT*/

    ....

    ....

}

const uint8_t CustomHID_ReportDescriptor[CUSTOMHID_SIZ_REPORT_DESC] =

  {

    ....

    ....

/* Led 1 */

    0x85, 0x01,            /*     REPORT_ID (1)       */

    0x09, 0x01,            /*     USAGE (LED 1)              */

    0x15, 0x00,            /*     LOGICAL_MINIMUM (0)        */

    0x25, 0x01,            /*     LOGICAL_MAXIMUM (1)        */

    0x75, 0x08,            /*     REPORT_SIZE (8)            */

    0x95, 0x01,  changed to 0x95, 0x40          /* REPORT_COUNT (1) */

    ...

    ...

    }

I also increased the SendBuffer size to 65.

Thanks...

2 REPLIES 2
milan2
Associate II
Posted on May 29, 2015 at 18:12

Any luck with this?

Posted on May 29, 2015 at 18:21

Not sure this is a winning horse, 2013, single post user, no responses... Goes down at the first fence, breaks two of it's legs.

You'd do better starting your own thread, with a clear/concise breakdown of your problem and it's context.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..