Ejemplo n.º 1
0
/** \brief Processes the \c SET_FEATURE request (sets or enables a specific feature)
 *
 * The feature selector value must be appropriate to the recipient.
 *
 * <b>Parameters</b>:
 * - VALUE: Feature selector:
 *     - \c USBSR_FEATSEL_DEVICE_REMOTE_WAKEUP(1): Enable remote wakeup
 *     - \c USBSR_FEATSEL_ENDPOINT_HALT(0): Set the halt feature for the specified endpoint (not endpoint
 *       0!)
 * - INDEX: Depends upon the recipient:
 *     - DEVICE: Always 0
 *     - INTERFACE: Interface number
 *     - ENDPOINT: Endpoint address
 * - LENGTH: Always 0
 */
void usbsrSetFeature(void)
{
    if(!usbsrChangeFeature(true))
    {
        usbsrHookSetFeature();
    }
}
/** \brief Processes the \ref SET_FEATURE request (sets or enables a specific feature)
 *
 * The feature selector value must be appropriate to the recipient.
 *
 * <b>Parameters</b>:
 * - VALUE: Feature selector:
 *     - \c DEVICE_REMOTE_WAKEUP(1): Enable remote wakeup
 *     - \c ENDPOINT_HALT(0): Set the halt feature for the specified endpoint (not endpoint 0!)
 * - INDEX: Depends upon the recipient:
 *     - DEVICE: Always 0
 *     - INTERFACE: Interface number
 *     - ENDPOINT: Endpoint address
 * - LENGTH: Always 0
 */
void usbsrSetFeature(void)
{
   if (!ChangeFeature(TRUE)) {
      usbsrHookSetFeature();
   }
} // usbsrSetFeature