Move Set Feature and Clear Feature control request feature selector values into their own enum.
This commit is contained in:
parent
b120c4e4cd
commit
2d49c09b38
2 changed files with 22 additions and 19 deletions
|
@ -346,7 +346,7 @@ static void USB_Device_ClearSetFeature(void)
|
|||
{
|
||||
#if !defined(NO_DEVICE_REMOTE_WAKEUP)
|
||||
case REQREC_DEVICE:
|
||||
if ((uint8_t)USB_ControlRequest.wValue == FEATURE_REMOTE_WAKEUP)
|
||||
if ((uint8_t)USB_ControlRequest.wValue == FEATURE_SEL_DeviceRemoteWakeup)
|
||||
USB_RemoteWakeupEnabled = (USB_ControlRequest.bRequest == REQ_SetFeature);
|
||||
else
|
||||
return;
|
||||
|
@ -355,7 +355,7 @@ static void USB_Device_ClearSetFeature(void)
|
|||
#endif
|
||||
#if !defined(CONTROL_ONLY_DEVICE)
|
||||
case REQREC_ENDPOINT:
|
||||
if ((uint8_t)USB_ControlRequest.wValue == FEATURE_ENDPOINT_HALT)
|
||||
if ((uint8_t)USB_ControlRequest.wValue == FEATURE_SEL_EndpointHalt)
|
||||
{
|
||||
uint8_t EndpointIndex = ((uint8_t)USB_ControlRequest.wIndex & ENDPOINT_EPNUM_MASK);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue