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

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

}

vendor requests means that you have to use setup_vendor() to setup the Urb… :wink:
“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

}

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

}

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