usbd_io()

I am using usbd_io() for a bulk-in data transfer. I have an I/O
completion callback, but it only gets called when the USB device has
data ready. I don’t have anyway of knowing when the data will be ready
and I don’t always want to wait until the data is ready. I had hoped
that the usbd_io() “timeout” parameter would terminate the usbd_io()
request after the specified amount of time and provide the appropriate
completion status.

  1. What is the usbd_io() “timeout” parameter used for? I’ve tried 0,
    10, 100, and USBD_TIMEOUT_INFINITY, but in all cases the bulk-in
    request just waits for data to arrive before calling the I/O
    completion callback.
  2. Is “timeout” the maximum amount of time usbd_io() waits to submit
    a URB to the stack or the maximum amount of time the stack will
    wait for the data transfer to complete on the USB? or neither?
  3. Is there a way to perform a bulk-in request and have it complete
    within a specified amount of time when no data is ready on the
    bulk-in endpoint?

Regards,
Rob

The current release USB stack honours the timeout value for Control Transfers
only. The next release will honour it for Bulk.


Robert Martini (rmartini@dedica.com) wrote:

: --------------060302070009080401090701
: Content-Type: text/plain; charset=us-ascii; format=flowed
: Content-Transfer-Encoding: 7bit

: I am using usbd_io() for a bulk-in data transfer. I have an I/O
: completion callback, but it only gets called when the USB device has
: data ready. I don’t have anyway of knowing when the data will be ready
: and I don’t always want to wait until the data is ready. I had hoped
: that the usbd_io() “timeout” parameter would terminate the usbd_io()
: request after the specified amount of time and provide the appropriate
: completion status.

: 1. What is the usbd_io() “timeout” parameter used for? I’ve tried 0,
: 10, 100, and USBD_TIMEOUT_INFINITY, but in all cases the bulk-in
: request just waits for data to arrive before calling the I/O
: completion callback.
: 2. Is “timeout” the maximum amount of time usbd_io() waits to submit
: a URB to the stack or the maximum amount of time the stack will
: wait for the data transfer to complete on the USB? or neither?
: 3. Is there a way to perform a bulk-in request and have it complete
: within a specified amount of time when no data is ready on the
: bulk-in endpoint?

: Regards,
: Rob

: --------------060302070009080401090701
: Content-Type: text/html; charset=us-ascii
: Content-Transfer-Encoding: 7bit

:
:
:
:
: I am using usbd_io() for a bulk-in data transfer.  I have an I/O completion
: callback, but it only gets called when the USB device has data ready. I don’t
: have anyway of knowing when the data will be ready and I don’t always want
: to wait until the data is ready.  I had hoped that the usbd_io() “timeout”
: parameter would terminate the usbd_io() request after the specified amount
: of time and provide the appropriate completion status.

:


    :
  1. What is the usbd_io() “timeout” parameter used for?  I’ve tried 0,
    : 10, 100, and USBD_TIMEOUT_INFINITY, but in all cases the bulk-in request
    : just waits for data to arrive before calling the I/O completion callback.

  2. :
  3. Is “timeout” the maximum amount of time usbd_io() waits to submit a
    : URB to the stack or the maximum amount of time the stack will wait for the
    : data transfer to complete on the USB? or neither?

  4. :
  5. Is there a way to perform a bulk-in request and have it complete within
    : a specified amount of time when no data is ready on the bulk-in endpoint?

  6. :

: Regards,

: Rob
:
:

: --------------060302070009080401090701–