| View previous topic :: View next topic |
| Author |
Message |
ole
Joined: 08 May 2004 Posts: 92 Location: Czech Republic
|
Posted: Thu Jan 27, 2005 4:20 am Post subject: ps2sdk - usbd_macro.h BUG ? |
|
|
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 |
|
 |
Oobles Site Admin
Joined: 17 Jan 2004 Posts: 362 Location: Melbourne, Australia
|
Posted: Thu Feb 10, 2005 10:55 pm Post subject: |
|
|
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 |
|
 |
|