usbtmclib_requests.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef USBTMCLIB_REQUESTS_H
  2. #define USBTMCLIB_REQUESTS_H
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #include "usbd_def.h"
  6. //----------------------------------------------------------------
  7. // Refer to:
  8. // [1] USBTMC Standard, rev. 1.0, 14/04/2003
  9. // "Universal Serial Bus Test and Measurement Class Specification (USBTMC)"
  10. // [2] USBTMC-USB488 Standard, rev. 1.0, 14/04/2003
  11. // "Universal Serial Bus Test and Measurement Class, Subclass USB488 Specification (USBTMC-USB488)
  12. //----------------------------------------------------------------
  13. // @eUSBTMCControlRequests_t
  14. // USBTMC specific requests via USB-Control protocol
  15. // see section 4.2.1 [1]
  16. typedef enum
  17. {
  18. // @eUSBTMC_INITIATE_ABORT_BULK_OUT
  19. // Macro: INITIATE_ABORT_BULK_OUT
  20. // Aborts a Bulk-OUT transfer.
  21. eUSBTMC_INITIATE_ABORT_BULK_OUT = 0x01,
  22. // @eUSBTMC_CHECK_ABORT_BULK_OUT_STATUS
  23. // Macro: CHECK_ABORT_BULK_OUT_STATUS
  24. // Returns the status of the previously sent INITIATE_ABORT_BULK_OUT request.
  25. eUSBTMC_CHECK_ABORT_BULK_OUT_STATUS = 0x02,
  26. // @eUSBTMC_INITIATE_ABORT_BULK_IN
  27. // Macro: INITIATE_ABORT_BULK_IN
  28. // Aborts a Bulk-IN transfer.
  29. eUSBTMC_INITIATE_ABORT_BULK_IN = 0x03,
  30. // @eUSBTMC_CHECK_ABORT_BULK_IN_STATUS
  31. // Macro: CHECK_ABORT_BULK_IN_STATUS
  32. // Returns the status of the previously sent INITIATE_ABORT_BULK_IN request.
  33. eUSBTMC_CHECK_ABORT_BULK_IN_STATUS = 0x04,
  34. // @eUSBTMC_INITIATE_CLEAR
  35. // Macro: INITIATE_CLEAR
  36. // Clears all previously sent pending and
  37. // unprocessed Bulk-OUT USBTMC message
  38. // content and clears all pending Bulk-IN transfers
  39. // from the USBTMC interface.
  40. eUSBTMC_INITIATE_CLEAR = 0x05,
  41. // @eUSBTMC_CHECK_CLEAR_STATUS
  42. // Macro: CHECK_CLEAR_STATUS
  43. // Returns the status of the previously sent INITIATE_CLEAR request.
  44. eUSBTMC_CHECK_CLEAR_STATUS = 0x06,
  45. // @eUSBTMC_GET_CAPABILITIES
  46. // Macro: GET_CAPABILITIES
  47. // Returns attributes and capabilities of the USBTMC interface.
  48. eUSBTMC_GET_CAPABILITIES = 0x07,
  49. // @eUSBTMC_INDICATOR_PULSE
  50. // Macro: INDICATOR_PULSE
  51. // A mechanism to turn on an activity indicator for
  52. // identification purposes. The device indicates
  53. // whether or not it supports this request in the
  54. // GET_CAPABILITIES response packet.
  55. eUSBTMC_INDICATOR_PULSE = 0x40,
  56. // @eUSBTMC_USB488_READ_STATUS_BYTE
  57. // Macro: READ_STATUS_BYTE
  58. // Allows to read the status byte using class request
  59. eUSBTMC_USB488_READ_STATUS_BYTE = 0x80,
  60. }
  61. eUSBTMCControlRequests_t;
  62. #endif