usb

Reset usb device

   1 #include <stdio.h>
   2 #include <fcntl.h>
   3 #include <errno.h>
   4 #include <sys/ioctl.h>
   5 #include <linux/usbdevice_fs.h>
   6 void main(int argc, char **argv)
   7 {
   8         const char *filename;
   9         int fd;
  10         filename = argv[1];
  11         fd = open(filename, O_WRONLY);
  12         ioctl(fd, USBDEVFS_RESET, 0);
  13         close(fd);
  14         return;
  15 }

usb (last edited 2014-02-26 09:03:59 by bl7-65-145)