how to detemine the "request" parameter in function usbd_set

bridged with qdn.public.ddk.usb
Post Reply
Meg Dai

how to detemine the "request" parameter in function usbd_set

Post by Meg Dai » Tue Sep 02, 2003 8:55 am

I am trying to write a class drive so I studied the ddk docs and the sample
codes.However,i just cant understand how to determine the value of request
in function usbd_setup_vendor
the prototype is:
int usbd_setup_vendor( struct usbd_urb *urb,
_uint32 flags, _uint16 request,
_uint16 rtype, _uint16 value,
_uint16 index, void *addr,
_uint32 len );

in sample code prn.c,it is called for 3 times:
1) usbd_setup_vendor( urb, URB_DIR_IN, 0, USB_TYPE_CLASS |
USB_RECIPIENT_INTERFACE, 0, 0, buffer, length );
2) usbd_setup_vendor( urb, URB_DIR_OUT, PRN_SOFT_RESET /*=2*/,
USB_TYPE_CLASS |
( ( prn->bcdUSB & 0x10 ) ? USB_RECIPIENT_INTERFACE :
USB_RECIPIENT_OTHER ),
3) usbd_setup_vendor( urb, URB_DIR_IN, 1, USB_TYPE_CLASS |
USB_RECIPIENT_INTERFACE, 0, 0, buffer, 1 );

As I can't find other sample source codes, could anyone kindly tell me how
to make the decision? Thanks very much.

Hercot Jean-Yves

Re: how to detemine the "request" parameter in function usbd

Post by Hercot Jean-Yves » Tue Sep 02, 2003 2:15 pm

I have replied to you by mail...

Having a look to my posts about snoopy pro should be enough to understand
what you are searching for...

Ps: Open the snoopy logs with snoopy pro and the results will be more easy
to read... ;-)

"Meg Dai" <zzdai@ms.mmit.stc.sh.cn> a écrit dans le message news:
bj1l81$f9b$1@inn.qnx.com...
I am trying to write a class drive so I studied the ddk docs and the
sample
codes.However,i just cant understand how to determine the value of request
in function usbd_setup_vendor
the prototype is:
int usbd_setup_vendor( struct usbd_urb *urb,
_uint32 flags, _uint16 request,
_uint16 rtype, _uint16 value,
_uint16 index, void *addr,
_uint32 len );

in sample code prn.c,it is called for 3 times:
1) usbd_setup_vendor( urb, URB_DIR_IN, 0, USB_TYPE_CLASS |
USB_RECIPIENT_INTERFACE, 0, 0, buffer, length );
2) usbd_setup_vendor( urb, URB_DIR_OUT, PRN_SOFT_RESET /*=2*/,
USB_TYPE_CLASS |
( ( prn->bcdUSB & 0x10 ) ? USB_RECIPIENT_INTERFACE :
USB_RECIPIENT_OTHER ),
3) usbd_setup_vendor( urb, URB_DIR_IN, 1, USB_TYPE_CLASS |
USB_RECIPIENT_INTERFACE, 0, 0, buffer, 1 );

As I can't find other sample source codes, could anyone kindly tell me how
to make the decision? Thanks very much.

Post Reply

Return to “qdn.public.ddk.usb”