Hello,
our device has an interrupt out endpoint. To this endpoint I
have to write some data (3-260 bytes). The endpoint size is 8
and the interval is 16.
Currently I write the data in a loop to the out-endpint. Between
the one-shot Interrupt-URBs I make a mdelay(16). (See below)
AFAIK mdelay(16) does 16ms busy-waiting. I tried to call schedule_timeout(),
but this function is not precise enough.
Is there an alternative for mdelay(16)?
How does the usb-core achieve that the interrupt-in endpoint is polled
exactly every X ms (X=8, with our device)?
Best regards,
Thomas Wahrenbruch
while(todo > 0) {
// max 8 byte in one urb (endpoint size)
length = (todo < 8) ? todo : 8;
// copy data to transfer buffer
memcpy(port->write_urb->transfer_buffer, priv->buf + priv->cur_pos, length );
FILL_BULK_URB( port->write_urb,
port->serial->dev,
usb_sndbulkpipe( port->serial->dev,priv->write_int_endpoint_address),
port->write_urb->transfer_buffer,
length,
kobil_write_callback,
port
);
priv->cur_pos = priv->cur_pos + length;
result = usb_submit_urb( port->write_urb );
dbg( __FUNCTION__ " %d Send write URB returns: %i", port->number, result);
todo = priv->filled - priv->cur_pos;
mdelay(16);
//set_current_state(TASK_UNINTERRUPTIBLE);
//schedule_timeout(20 * HZ / 1000);
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
- Re: [linux-usb-devel] Testing multiple cyberJacks Matthias Bruestle
- Re: [linux-usb-devel] Testing multiple cyberJacks Matthias Bruestle
- Re: [linux-usb-devel] Testing multiple cyberJacks Greg KH
- Re: [linux-usb-devel] Testing multiple cyberJacks Matthias Bruestle
- Re: [linux-usb-devel] Testing multiple cyberJacks Matthias Bruestle
- Re: [linux-usb-devel] Testing multiple cyberJacks Matthias Bruestle
- Re: [linux-usb-devel] Testing multiple cyberJacks Matthias Bruestle
- [linux-usb-devel] Multiple cyberJacks again - problem w... Matthias Bruestle
- Re: [linux-usb-devel] Multiple cyberJacks again - probl... Oliver Neukum
- [linux-usb-devel] cyberJack with out of sequence data Matthias Bruestle
- Re: [linux-usb-devel] Alternative for mdelay(16)? Thomas Wahrenbruch
- Re: [linux-usb-devel] Alternative for mdelay(16)? David Brownell
- Re: [linux-usb-devel] Alternative for mdelay(16)? Thomas Wahrenbruch
- Re: [linux-usb-devel] Alternative for mdelay(16)? David Brownell
- Re: [linux-usb-devel] Alternative for mdelay(16)? Thomas Wahrenbruch
- Re: [linux-usb-devel] Re: Vicam/3com homeconnect usb ca... John Tyner
- Re: [linux-usb-devel] Re: Vicam/3com homeconnect usb ca... Oliver Neukum
- Re: [linux-usb-devel] Re: Vicam/3com homeconnect usb ca... David Brownell
- Re: [linux-usb-devel] Re: Vicam/3com homeconnect usb ca... David Brownell
- Re: [linux-usb-devel] Re: Vicam/3com homeconnect usb ca... Johannes Erdfelt
- Re: [linux-usb-devel] Re: Vicam/3com homeconnect usb ca... David Brownell