int main() { int32_t rc; uint32_t numBlks, blkSize; uint8_t inquiryResult[INQUIRY_LENGTH]; /* SystemClockUpdate() updates the SystemFrequency variable */ SystemClockUpdate(); UART_Init(57600); /* Initialize the serial port to view the log messages */ Host_Init(); /* Initialize the lpc17xx host controller */ rc = Host_EnumDev(); /* Enumerate the device connected */ if (rc == OK) { /* Initialize the mass storage and scsi interfaces */ rc = MS_Init( &blkSize, &numBlks, inquiryResult ); if (rc == OK) { rc = FAT_Init(); /* Initialize the FAT16 file system */ if (rc == OK) { Main_Copy(); /* Call the application */ } else { return (0); } } else { return (0); } } else { return (0); } while(1); }
int main() { USB_INT32S rc; USB_INT32U numBlks, blkSize; USB_INT08U inquiryResult[INQUIRY_LENGTH]; // Code Red - if CMSIS 1.3 setup is being used, then SystemInit() routine // will be called by startup code rather than in application's main() #ifndef __USE_CMSIS SystemInit(); /* initialize clocks */ #endif UART_Init(115200); /* Initialize the serial port to view the log messages */ Host_Init(); /* Initialize the lpc17xx host controller */ rc = Host_EnumDev(); /* Enumerate the device connected */ if (rc == OK) { /* Initialize the mass storage and scsi interfaces */ rc = MS_Init( &blkSize, &numBlks, inquiryResult ); if (rc == OK) { rc = FAT_Init(); /* Initialize the FAT16 file system */ if (rc == OK) { Main_Copy(); /* Call the application */ } else { while ( 1 ); return (0); } } else { while ( 1 ); return (0); } } else { while ( 1 ); return (0); } while(1); }