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 

ps2sdk - usbd_macro.h BUG ?

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



Joined: 08 May 2004
Posts: 92
Location: Czech Republic

PostPosted: Thu Jan 27, 2005 4:20 am    Post subject: ps2sdk - usbd_macro.h BUG ? Reply with quote

I have noticed that macros for control transfers defined in usbd_macro.h follow the same (buggy) pattern when specifying the devreq.requesttype.
In the macro there is for example : USB_DIR_IN & USB_RECIP_INTERFACE, so the reult is 0 (USB_DIR_IN = 0x80 & USB_RECIP_INTERFACE = 2). The correct definition should be USB_DIR_IN + USB_RECIP_INTERFACE that gives the (correct) value 0x82 (defined in usb11.pdf, Table 9-3, page 186).

Anyone agree?
Back to top
View user's profile Send private message
Oobles
Site Admin


Joined: 17 Jan 2004
Posts: 362
Location: Melbourne, Australia

PostPosted: Thu Feb 10, 2005 10:55 pm    Post subject: Reply with quote

Yes, I agree the macros are wrong. Instead of using + I've changed the macros to use | which I think is more correct for the situation. I've committed the change to CVS.

Oobles.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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