forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Two USB questions...

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
dega



Joined: 24 Oct 2006
Posts: 14

PostPosted: Fri Jan 25, 2008 4:12 pm    Post subject: Two USB questions... Reply with quote

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:

/* 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/usb5.htm#StringDescriptors 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/structStringDescriptor.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
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group