To peter: the func parameter in usbd_io() must be NULL

bridged with qdn.public.ddk.usb
Post Reply
leon mike

To peter: the func parameter in usbd_io() must be NULL

Post by leon mike » Fri Mar 28, 2003 4:15 am

The docs of UDDK V1.0(beta) said " for-this release of the USB_SDK,vendor requests are synchronous only,the func parameter in usbd_io() must be NULL".But how to explain below?

if(0 == usbd_setup_isochronous(urb, URB_ISOCH_ASAP | URB_DIR_IN, 0, databuffer, pdev->vmax_packet_size))

usbd_io(urb, pipe, isoc_handler, address_of_mydevice_structure, timeout);

........

void isoc_handler(struct usbd_urb *urb, struct usbd_pipe *pipe, void *hdl){ struct my_device *pdev = (struct my_device*)hdl;

......bla bla

}

Hercot Jean-Yves

Re: To peter: the func parameter in usbd_io() must be NULL

Post by Hercot Jean-Yves » Fri Mar 28, 2003 10:09 am

vendor requests means that you have to use setup_vendor() to setup the Urb... ;-)
"leon mike" <yqdu@yahoo.com.cn> a ¨¦crit dans le message de news: b60hbq$amh$1@inn.qnx.com...
The docs of UDDK V1.0(beta) said " for-this release of the USB_SDK,vendor requests are synchronous only,the func parameter in usbd_io() must be NULL".But how to explain below?

if(0 == usbd_setup_isochronous(urb, URB_ISOCH_ASAP | URB_DIR_IN, 0, databuffer, pdev->vmax_packet_size))

usbd_io(urb, pipe, isoc_handler, address_of_mydevice_structure, timeout);

.......

void isoc_handler(struct usbd_urb *urb, struct usbd_pipe *pipe, void *hdl){ struct my_device *pdev = (struct my_device*)hdl;

.....bla bla

}

Peter

Re: To peter: the func parameter in usbd_io() must be NULL

Post by Peter » Mon Mar 31, 2003 6:35 pm

leon, the func parameter is only NULL for vendor setup.
if you setup an isochronous or bulk urb, you have to specify a callback
function. synchron vendor setup means, the operation is complete if the
usbd_io() returns. so you can check the urb-status imediately after the
usbd_io() returns.
btw: vendor setups and control setups are the same in this QNX
implementation. if you port from linux to qnx, keep in mind that qnx doesn't
support linked urb's.
cheers, peter

"leon mike" <yqdu@yahoo.com.cn> schrieb im Newsbeitrag
news:b60hbq$amh$1@inn.qnx.com...
The docs of UDDK V1.0(beta) said " for-this release of the USB_SDK,vendor
requests are synchronous only,the func parameter in usbd_io() must be
NULL".But how to explain below?

if(0 == usbd_setup_isochronous(urb, URB_ISOCH_ASAP | URB_DIR_IN, 0,
databuffer, pdev->vmax_packet_size))

usbd_io(urb, pipe, isoc_handler, address_of_mydevice_structure, timeout);

........

void isoc_handler(struct usbd_urb *urb, struct usbd_pipe *pipe, void
*hdl){ struct my_device *pdev = (struct my_device*)hdl;

......bla bla

}

leon mike

Re: To peter: the func parameter in usbd_io() must be NULL

Post by leon mike » Tue Apr 01, 2003 3:46 am

Thank you very much!I will try again soon!Bless me!:-)

Post Reply

Return to “qdn.public.ddk.usb”