예제 #1
0
int stopUsbHost()
{
	int ret = sceUsbDeactivate( HOSTFSDRIVER_PID );
	if ( ret != 0 )
	{
		log( "Error Deactivate driver %08x (0x%08X)\n", HOSTFSDRIVER_PID, ret );
		//return -1;
	}
	ret = sceUsbStop( HOSTFSDRIVER_NAME, 0, 0 );
	if ( ret != 0 )
	{
		log( "Error stopping USB Host driver (0x%08X)\n", ret );
		//return -1;
	}
	if ( fw_version < FW_500 || sceKernelInitKeyConfig() == PSP_INIT_KEYCONFIG_GAME )
	{
		sceUsbStop(PSP_USBBUS_DRIVERNAME, 0, 0);
		if ( ret != 0 )
		{
			log( "Error stopping USB Bus driver (0x%08X)\n", ret );
			//return -1;
		}
	}
	killModule( "USBHostFS" );
	return 0;
}
예제 #2
0
/**
 * Disables an active usb connection
 */
int disableUsb(void) 
{ 
	sceUsbDeactivate(0);
	pspUsbDeviceFinishDevice();
	sceUsbStop(PSP_USBSTOR_DRIVERNAME, 0, 0);
	sceUsbStop(PSP_USBBUS_DRIVERNAME, 0, 0);

	return 0;
}
예제 #3
0
void stop_usb()
{
	if (usbStarted)
	{
		sceUsbDeactivate(0);
		sceUsbStop(PSP_USBSTOR_DRIVERNAME, 0, 0);
		sceUsbStop(PSP_USBBUS_DRIVERNAME, 0, 0);

		usbStarted = 0;
	}
}
예제 #4
0
int LPP_UtilsStopUsbStorage(void)
{
    if(!usbStarted) return 1;

    sceUsbDeactivate(0x1c8);
    sceUsbStop(PSP_USBSTOR_DRIVERNAME, 0, 0);
    sceUsbStop(PSP_USBBUS_DRIVERNAME, 0, 0);
    usbStarted = 0;

    return 0;
}
예제 #5
0
파일: main.c 프로젝트: bensaraceno/PSP
int StopUsb() {
	int result = sceUsbStop(PSP_USBCAMMIC_DRIVERNAME, 0, 0);	
	if (result < 0) { printf("Error 0x%08X stopping usbcammic driver.\n", result); }

	result = sceUsbStop(PSP_USBCAM_DRIVERNAME, 0, 0);
	if (result < 0) { printf("Error 0x%08X stopping usbcam driver.\n", result); }

	result = sceUsbStop(PSP_USBACC_DRIVERNAME, 0, 0);
	if (result < 0) { printf("Error 0x%08X stopping usbacc driver.\n", result); }

	result = sceUsbStop(PSP_USBBUS_DRIVERNAME, 0, 0);
	if (result < 0) printf("Error 0x%08X stopping usbbus driver.\n", result);
	return result;
}
예제 #6
0
/*------------------------------------------------------------------------------*/
static int MyUsbStop( const char *name, unsigned int args, void *argp )
{
	int ret = sceUsbStop( name, args, argp );
	if ( strcmp( name, "USBStor_Driver" ) == 0 ){ UsbResume(); }
	return( ret );
}