Index: firmware/source/sys_main.c =================================================================== diff -u -r37a8a58b766a496b39241dd7ae46dc10dbda35e4 -r30f049651877229042e3f8700c8596e5b9a1e0f4 --- firmware/source/sys_main.c (.../sys_main.c) (revision 37a8a58b766a496b39241dd7ae46dc10dbda35e4) +++ firmware/source/sys_main.c (.../sys_main.c) (revision 30f049651877229042e3f8700c8596e5b9a1e0f4) @@ -107,12 +107,12 @@ { /* USER CODE BEGIN (3) */ - initProcessor(); // configure processor - initSoftware(); // initialize software modules - initHardware(); // configure external hardware - initTasks(); // setup and start the scheduled tasks + initProcessor(); // Configure processor + initSoftware(); // Initialize software modules + initHardware(); // Configure external hardware + initTasks(); // Setup and start the scheduled tasks - // start task background (will not return) + // Start task background (will not return) #ifndef _VECTORCAST_ taskBackground(); #endif @@ -135,11 +135,11 @@ *************************************************************************/ static void initProcessor( void ) { - gioInit(); // configure GPIO pins - hetInit(); // configure HET1 - adcInit(); // configure internal ADC channels - mibspiInit(); // re-purposing MIBSPI5 I/O/C pins as GPIO - etpwmInit(); // configure PWMs + gioInit(); // Configure GPIO pins + hetInit(); // Configure HET1 + adcInit(); // Configure internal ADC channels + mibspiInit(); // Re-purposing MIBSPI5 I/O/C pins as GPIO + etpwmInit(); // Configure PWMs etpwmSetCmpA( etpwmREG1, 0 ); etpwmSetCmpA( etpwmREG2, 0 ); etpwmSetCmpA( etpwmREG3, 0 ); @@ -150,7 +150,7 @@ canInit(); // CAN1 = CAN, re-purposing CAN2 and CAN3 Rx and Tx pins as GPIO //canEnableloopback( canREG1, External_Lbk ); // TODO - debug code sciInit(); // SCI1 used for PC serial interface, SCI2 used for FPGA serial interface - dmaEnable(); // enable DMA + dmaEnable(); // Enable DMA } /************************************************************************* @@ -162,36 +162,36 @@ *************************************************************************/ static void initSoftware( void ) { - // initialize ms timer counter + // Initialize ms timer counter initTimers(); - // initialize alarm manager + // Initialize alarm manager initAlarmMgmt(); - // initialize drivers + // Initialize drivers initCPLD(); initSafetyShutdown(); initInternalADC(); initRTC(); - // initialize services + // Initialize services initCommBuffers(); initFPGA(); initMsgQueues(); initNVDataMgmt(); initSystemComm(); initWatchdogMgmt(); - // initialize monitors + // Initialize monitors initAccel(); initButtons(); initPresOccl(); - // initialize controllers + // Initialize controllers initAirTrap(); initAlarmLamp(); initBloodFlow(); initDialInFlow(); initDialOutFlow(); initValves(); - // initialize modes + // Initialize modes initOperationModes(); - // initialize async interrupt handlers + // Initialize async interrupt handlers initInterrupts(); } @@ -215,13 +215,13 @@ *************************************************************************/ static void initTasks( void ) { - // initialize RTI to setup the 3 tasks + // Initialize RTI to setup the 3 tasks rtiInit(); rtiEnableNotification( rtiNOTIFICATION_COMPARE0 | rtiNOTIFICATION_COMPARE1 | rtiNOTIFICATION_COMPARE3 ); rtiStartCounter( rtiCOUNTER_BLOCK0 ); - // the timer task requires FIQ enabled + // The timer task requires FIQ enabled _enable_FIQ(); - // the general and priority tasks require IRQ enabled + // The general and priority tasks require IRQ enabled _enable_IRQ(); }