AnsweredAssumed Answered

USB VID/PID change using example code dev_hid_generic_freertos

Question asked by Nick Guzzardo on Jun 14, 2018
Latest reply on Jun 19, 2018 by Daniel Chen

First, an intro before my question ... I am using the TWR-K22F120M tower board to develop a USB device.  Using the SDK for that board including the USB stack and FreeRTOS, I have successfully tested the example code for the generic HID with FreeRTOS ("dev_hid_generic_freertos").  This required downloading and modifying code from codeproject.com per the readme.pdf (attached) in the example code folder.  Here is the link:

 

A USB HID Component for C# - CodeProject 

 

Follow the readme instructions EXACTLY and it will work.  I initially compiled the C# program for "all processors" and it would compile and run, but it would not connect to the device and echo data.  NOTE - there are code modifications required and defined in the readme.  Here is what the running program looks like except that I modified the VID/PID and default send data:

 

USB HID program

 

QUESTION:  Being brand new to the USB game, I assume the VID and PID are hard-coded somewhere in the example code.  I verified that the VID is for NXP.  Since I'm a little slower than the other kids, I could not find where this is.  We have our own VID and PID block reserved, so I would like to put it in the code.  Does anyone know where VID and PID are defined in this project?

Attachments

Outcomes