XilinxProcessorIPLib/drivers/usbpsu/examples/xusb_ch9_audio_dfu.c
s32 Usb_SetConfigurationApp(struct Usb_DevData *InstancePtr, SetupPacket *SetupData)
{
	s32 RetVal;

	SetConfigDone(InstancePtr->PrivateData, 1U);
	if ((SetupData->wValue & 0xff) == 0) {

		/* Endpoint disables - not needed for Control EP */
		RetVal = EpDisable(InstancePtr->PrivateData, ISO_EP, USB_EP_DIR_OUT);
		if (RetVal != XST_SUCCESS) {
			xil_printf("failed to disable ISOC OUT Ep\r\n");
			return XST_FAILURE;
		}

		RetVal = EpDisable(InstancePtr->PrivateData, ISO_EP, USB_EP_DIR_IN);
		if (RetVal != XST_SUCCESS) {
			xil_printf("failed to disable ISOC IN Ep\r\n");
			return XST_FAILURE;
		}

		SetConfigDone(InstancePtr->PrivateData, 0U);
	}

	return XST_SUCCESS;
}
/****************************************************************************/
/**
* This function is called by Chapter9 handler when SET_CONFIGURATION command
* is received from Host.
*
* @param	InstancePtr is pointer to Usb_DevData instance.
* @param	SetupData is the setup packet received from Host.
*
* @return	- XST_SUCCESS if successful,
*		- XST_FAILURE if unsuccessful.
*
*****************************************************************************/
This function is called by Chapter9 handler when SET_CONFIGURATION command
is received from Host.
This function is called by Chapter9 handler when SET_CONFIGURATION command is received from Host .
s32 Usb_SetConfigurationApp(struct Usb_DevData *InstancePtr, SetupPacket *SetupData)
{
	s32 RetVal;
	SetConfigDone(InstancePtr->PrivateData, 1U);
	if ((SetupData->wValue & 0xff) == 0) {
		RetVal = EpDisable(InstancePtr->PrivateData, ISO_EP, USB_EP_DIR_OUT);
		if (RetVal != XST_SUCCESS) {
			xil_printf("failed to disable ISOC OUT Ep\r\n");
			return XST_FAILURE;
		}
		RetVal = EpDisable(InstancePtr->PrivateData, ISO_EP, USB_EP_DIR_IN);
		if (RetVal != XST_SUCCESS) {
			xil_printf("failed to disable ISOC IN Ep\r\n");
			return XST_FAILURE;
		}
		SetConfigDone(InstancePtr->PrivateData, 0U);
	}
	return XST_SUCCESS;
}
s32 Usb_SetConfigurationApp ( struct Usb_DevData * InstancePtr , SetupPacket * SetupData ) { s32 RetVal ; SetConfigDone ( InstancePtr -> PrivateData , 1U ) ; if ( ( SetupData -> wValue & 0xff ) == 0 ) { RetVal = EpDisable ( InstancePtr -> PrivateData , ISO_EP , USB_EP_DIR_OUT ) ; if ( RetVal != XST_SUCCESS ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } RetVal = EpDisable ( InstancePtr -> PrivateData , ISO_EP , USB_EP_DIR_IN ) ; if ( RetVal != XST_SUCCESS ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } SetConfigDone ( InstancePtr -> PrivateData , 0U ) ; } return XST_SUCCESS ; }
This function is called by Chapter9 handler when SET_CONFIGURATION command
is received from Host.
This function is called by Chapter9 handler when SET_CONFIGURATION command is received from Host .
/* Endpoint disables - not needed for Control EP */