usbtmclib_errors.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef USBTMCLIB_ERRORS_H
  2. #define USBTMCLIB_ERRORS_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. // @eUSBTMCStatusCodes_t
  14. // USBTMC specific requests via USB-Control protocol
  15. // see section 4.2.1 [1]
  16. typedef enum
  17. {
  18. // @eUSBTMC_STATUS_SUCCESS
  19. // Macro: STATUS_SUCCESS
  20. // A success status code.
  21. eUSBTMC_STATUS_SUCCESS = 0x01,
  22. // @eUSBTMC_STATUS_PENDING
  23. // Macro: STATUS_PENDING
  24. // This status is valid if a device has received a
  25. // USBTMC split transaction CHECK_STATUS
  26. // request and the request is still being processed.
  27. // See 4.2.1.1. [1]
  28. eUSBTMC_STATUS_PENDING = 0x02,
  29. // @eUSBTMC_STATUS_FAILED
  30. // Macro: STATUS_FAILED
  31. // Failure, unspecified reason, and a more specific
  32. // USBTMC_status is not defined.
  33. eUSBTMC_STATUS_FAILED = 0x80,
  34. // @eUSBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS
  35. // Macro: STATUS_TRANSFER_NOT_IN_PROGRESS
  36. // This status is only valid if a device has received
  37. // an INITIATE_ABORT_BULK_OUT or INITIATE_ABORT_BULK_IN
  38. // request and the specified transfer to abort is not in progress.
  39. eUSBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS = 0x81,
  40. // @eUSBTMC_STATUS_SPLIT_NOT_IN_PROGRESS
  41. // Macro: STATUS_SPLIT_NOT_IN_PROGRESS
  42. // This status is valid if the device received a
  43. // CHECK_STATUS request and the device is not
  44. // processing an INITIATE request.
  45. eUSBTMC_STATUS_SPLIT_NOT_IN_PROGRESS = 0x82,
  46. // @eUSBTMC_STATUS_SPLIT_IN_PROGRESS
  47. // Macro: STATUS_SPLIT_IN_PROGRESS
  48. // This status is valid if the device received a new
  49. // class-specific request and the device is still
  50. // processing an INITIATE.
  51. eUSBTMC_STATUS_SPLIT_IN_PROGRESS = 0x83,
  52. }
  53. eUSBTMCStatusCodes_t;
  54. #endif