/******************************************************************************* * Function Name : CustomHID_NoData_Setup * Description : handle the no data class specific requests * Input : Request Nb. * Output : None. * Return : USB_UNSUPPORT or USB_SUCCESS. *******************************************************************************/ RESULT CustomHID_NoData_Setup(uint8_t RequestNo) { if ((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT)) && (RequestNo == SET_PROTOCOL)) { return CustomHID_SetProtocol(); } else { return USB_UNSUPPORT; } }
/******************************************************************************* * Function Name : CustomHID_NoData_Setup * Description : handle the no data class specific requests * Input : Request Nb. * Output : None. * Return : USB_UNSUPPORT or USB_SUCCESS. *******************************************************************************/ static RESULT composite_cdc_hid_NoData_Setup(uint8_t RequestNo) { //hid if ((Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT)) && (RequestNo == SET_PROTOCOL)){ return CustomHID_SetProtocol(); } //cdc else if (Type_Recipient == (CLASS_REQUEST | INTERFACE_RECIPIENT)){ if (RequestNo == SET_COMM_FEATURE){ return USB_SUCCESS; } else if (RequestNo == SET_CONTROL_LINE_STATE){ return USB_SUCCESS; } } // unsupport return USB_UNSUPPORT; }