Beispiel #1
0
/** Main program entry point. This routine configures the hardware required by the application, then
 *  calls the filesystem function to read files from USB Disk
 */
int main(void)
{
	SetupHardware();

	DEBUGOUT("Mass Storage Host Demo running.\r\n");

	USB_ReadWriteFile();

	DEBUGOUT("Example completed.\r\n");
	while (1) {}
}
/* Task to Write Data in USBPendrive. */
void enterusbisp(void)
{
	/* Configure LED stats direction. */
	LEDPORT->FIODIR |= (1 << LEDPORTPIN);

	/* Configure the NVIC Preemption Priority Bits */
	NVIC_SetPriorityGrouping(1);

	USB_CurrentMode = USB_MODE_Host;
	USB_Disable();
	USB_Init();

	PRINTDBG("\nInit USB Bootloader Read.");

	if(USB_ReadWriteFile() == true)
	{
		LEDPORT->FIOPIN |= (1 << LEDPORTPIN);			/* LED's OFF. */
	}

	while (1);
}