Accessing String Descriptors | Cypress Semiconductor
Accessing String Descriptors
I'm a little bit confused as to how to access string descriptors after they've been set. In the application that I'm coding for, several string descriptors are initialized with default values. However, after initialization, the firmware queries an on-board EEPROM and changes the string descriptors based upon the values loaded in the EEPROM. The firmware also has the ability to modify the contents of the EEPROM, which then requires the string descriptors to be refreshed. I utilize the CyU3PUsbSetDesc function to set the string descriptors, but I don't see a listing in the API guide for a similar 'Get' function. There is CyU3PUsbGetDevProperty, but I can't find any examples in the SDK that use this function, so I'm not sure it's relevant (side question: how does this function work and what would it be used for?). In some of the examples, if a descriptor is requested, the requisite array that was used to initialize the descriptor is returned. However, if the 'Set' function fails, this value will not have been initialized in memory. The other alternative I've seen is CyFx3BootUsbGetDesc. Are these pointer values still valid, i.e. can I call this function even after the RTOS is up and running and get the right values?