ps2sdk - usbd_macro.h BUG ?

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
ole
Posts: 92
Joined: Sat May 08, 2004 11:14 pm
Location: Czech Republic

ps2sdk - usbd_macro.h BUG ?

Post by ole »

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?
Oobles
Site Admin
Posts: 347
Joined: Sat Jan 17, 2004 9:49 am
Location: Melbourne, Australia
Contact:

Post by Oobles »

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.
Post Reply