requests.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* Name: requests.h
  2. * Project: custom-class, a basic USB example
  3. * Author: Christian Starkjohann
  4. * Creation Date: 2008-04-09
  5. * Tabsize: 4
  6. * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
  7. * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
  8. * This Revision: $Id: requests.h 692 2008-11-07 15:07:40Z cs $
  9. */
  10. /* This header is shared between the firmware and the host software. It
  11. * defines the USB request numbers (and optionally data types) used to
  12. * communicate between the host and the device.
  13. */
  14. #ifndef __REQUESTS_H_INCLUDED__
  15. #define __REQUESTS_H_INCLUDED__
  16. #define CUSTOM_RQ_ECHO 0
  17. /* Request that the device sends back wValue and wIndex. This is used with
  18. * random data to test the reliability of the communication.
  19. */
  20. #define CUSTOM_RQ_SET_STATUS 1
  21. /* Set the LED status. Control-OUT.
  22. * The requested status is passed in the "wValue" field of the control
  23. * transfer. No OUT data is sent. Bit 0 of the low byte of wValue controls
  24. * the LED.
  25. */
  26. #define CUSTOM_RQ_GET_STATUS 2
  27. /* Get the current LED status. Control-IN.
  28. * This control transfer involves a 1 byte data phase where the device sends
  29. * the current status to the host. The status is in bit 0 of the byte.
  30. */
  31. #endif /* __REQUESTS_H_INCLUDED__ */