From 2d49c09b384375298a4995b79c4b29e8d9390cd6 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 28 Oct 2010 22:51:03 +0000 Subject: Move Set Feature and Clear Feature control request feature selector values into their own enum. --- LUFA/Drivers/USB/HighLevel/StdRequestType.h | 37 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'LUFA/Drivers/USB/HighLevel/StdRequestType.h') diff --git a/LUFA/Drivers/USB/HighLevel/StdRequestType.h b/LUFA/Drivers/USB/HighLevel/StdRequestType.h index 02afc9654..2d8c7cfab 100644 --- a/LUFA/Drivers/USB/HighLevel/StdRequestType.h +++ b/LUFA/Drivers/USB/HighLevel/StdRequestType.h @@ -147,23 +147,6 @@ #define REQREC_OTHER (3 << 0) //@} - /** \name Feature Request Types */ - //@{ - /** Feature indicator for Clear Feature or Set Feature commands. When used in a Clear Feature - * request this indicates that an endpoint (whose address is given elsewhere in the request - * should have its stall condition cleared. If used in a similar manner inside a Set Feature - * request, this stalls an endpoint. - */ - #define FEATURE_ENDPOINT_HALT 0x00 - - /** Feature indicator for Clear Feature or Set Feature commands. When used in a Clear Feature - * request this indicates that the remote wakeup enabled device should not issue remote - * wakeup requests until further notice. If used in a similar manner inside a Set Feature - * request, this re-enabled the remote wakeup feature on the device. - */ - #define FEATURE_REMOTE_WAKEUP 0x01 - //@} - /* Type Defines: */ /** \brief Standard USB Control Request * @@ -230,6 +213,26 @@ * via the \ref EVENT_USB_Device_UnhandledControlRequest() event when received in * device mode. */ }; + + /** Feature Selector values for Set Feature and Clear Feature standard control requests directed to the device, interface + * and endpoint recipients. + */ + enum USB_Feature_Selectors_t + { + FEATURE_SEL_EndpointHalt = 0x00, /**< Feature selector for Clear Feature or Set Feature commands. When + * used in a Set Feature or Clear Feature request this indicates that an + * endpoint (whose address is given elsewhere in the request should have + * its stall condition changed. + */ + FEATURE_SEL_DeviceRemoteWakeup = 0x01, /**< Feature selector for Device level Remote Wakeup enable set or clear. + * This feature can be controlled by the host on devices which indicate + * remote wakeup support in their descriptors to selectively disable or + * enable remote wakeup. + */ + FEATURE_SEL_TestMode = 0x02, /**< Feature selector for Test Mode features, used to test the USB controller + * to check for incorrect operation. + */ + }; /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) -- cgit v1.2.3