Two USB questions...

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
dega
Posts: 14
Joined: Tue Oct 24, 2006 1:22 pm

Two USB questions...

Post by dega »

I searched the forums and didn't find what I was looking for, so I thought I'd just ask my questions.


First off, I'm having trouble understanding the UsbInterfaces structure (the infp[2] field in particular). I've been using http://psp.jim.sh/pspsdk-doc/ for documentation reference, and it just doesn't give me enough information regarding this structure. (UsbInterfaces doc at http://psp.jim.sh/pspsdk-doc/structUsbInterfaces.html)

I checked the PSPLinkUSB source code on SVN and got more confused.

Code: Select all

/* Interfaces */
struct UsbInterface intp = {
        0xFFFFFFFF, 0, 1,
};
The PSPLinkUSB source sets this structure up with the values 0xFFFFFFFF, 0, and 1. I see that there is only 1 pointer set so the "num" field must be 1, but why is the first pointer to the InterfaceDescriptor 0xFFFFFFFF (I'm assuming the second pointer set to 0 is representing a NULL pointer) and why does the structure expect two pointers?

My second question is regarding some confusion I have on the string descriptor table. I have been consulting http://www.beyondlogic.org/usbnutshell/ ... escriptors to see if I can't figure out how to use them, but I have had no luck.

After looking at the StringDescriptor structure (http://psp.jim.sh/pspsdk-doc/structStri ... iptor.html) I noticed it doesn't really match the format that I found in my reference. Or does it?

Does the descriptor have a max of 32 possible languages or a 16 character Unicode string due to the 32 element array of shorts, or am I completely off? On top of that, I noticed that the UsbDriver structure (http://psp.jim.sh/pspsdk-doc/structUsbDriver.html) only has a single pointer to a StringDescriptor, so how would a string index in my other descriptors be able to associate with any string data if the sole StringDescriptor pointer in UsbDriver is pointing to the string descriptor describing the supported languages?

Thanks in advance :)!!!
- dega
Post Reply