Hi,

I am trying to write an application (not a device driver, in user mode)
which accesses 
the data of a USB device on Linux (RedHat 7.1).
So far I was using only BULK transfers, in the following way:

  int fd = open(filename, O_RDWR);

where filename is the file's name associated with my device, and then
transfer data to/from a specific pipe by:

  struct usbdevfs_bulktransfer bulk;

  bulk.ep      = 0x86;  // for example
  bulk.len     = *length;
  bulk.timeout = timeout;
  bulk.data    = buffer;

  ioctl( fd, USBDEVFS_BULK, &bulk );

where:

  struct usbdevfs_bulktransfer {
     unsigned int ep;
     unsigned int len;
     unsigned int timeout;   /* in milliseconds */
 
     void *data;
  };        

I looked in /usr/include/linux/usbdevice_fs.h for a similar structure to use

with INTERRUPT transfers, but found none. Is the structure for the interrupt
the same as the bulk's? 
If not, what should it be? And is reading data from interrupt pipes the same
as for bulk pipes?

Thanks,
Amira. 




_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to