tmc.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (C) 2007 Stefan Kopp, Gechingen, Germany
  3. * Copyright (C) 2008 Novell, Inc.
  4. * Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
  5. *
  6. * This file holds USB constants defined by the USB Device Class
  7. * Definition for Test and Measurement devices published by the USB-IF.
  8. *
  9. * It also has the ioctl definitions for the usbtmc kernel driver that
  10. * userspace needs to know about.
  11. */
  12. #ifndef __LINUX_USB_TMC_H
  13. #define __LINUX_USB_TMC_H
  14. /* USB TMC status values */
  15. #define USBTMC_STATUS_SUCCESS 0x01
  16. #define USBTMC_STATUS_PENDING 0x02
  17. #define USBTMC_STATUS_FAILED 0x80
  18. #define USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS 0x81
  19. #define USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS 0x82
  20. #define USBTMC_STATUS_SPLIT_IN_PROGRESS 0x83
  21. /* USB TMC requests values */
  22. #define USBTMC_REQUEST_INITIATE_ABORT_BULK_OUT 1
  23. #define USBTMC_REQUEST_CHECK_ABORT_BULK_OUT_STATUS 2
  24. #define USBTMC_REQUEST_INITIATE_ABORT_BULK_IN 3
  25. #define USBTMC_REQUEST_CHECK_ABORT_BULK_IN_STATUS 4
  26. #define USBTMC_REQUEST_INITIATE_CLEAR 5
  27. #define USBTMC_REQUEST_CHECK_CLEAR_STATUS 6
  28. #define USBTMC_REQUEST_GET_CAPABILITIES 7
  29. #define USBTMC_REQUEST_INDICATOR_PULSE 64
  30. /* Request values for USBTMC driver's ioctl entry point */
  31. #define USBTMC_IOC_NR 91
  32. #define USBTMC_IOCTL_INDICATOR_PULSE _IO(USBTMC_IOC_NR, 1)
  33. #define USBTMC_IOCTL_CLEAR _IO(USBTMC_IOC_NR, 2)
  34. #define USBTMC_IOCTL_ABORT_BULK_OUT _IO(USBTMC_IOC_NR, 3)
  35. #define USBTMC_IOCTL_ABORT_BULK_IN _IO(USBTMC_IOC_NR, 4)
  36. #define USBTMC_IOCTL_CLEAR_OUT_HALT _IO(USBTMC_IOC_NR, 6)
  37. #define USBTMC_IOCTL_CLEAR_IN_HALT _IO(USBTMC_IOC_NR, 7)
  38. #endif