/* Main Program */ int main (void) { int j=0; processorInit(); init_VIC(); //necessary 5-17-2006 EDM //initialize the motion control subsystem if( !init_motion_control() ) status_led(MOTION_INIT_ERR); init_status_led(); for(j=0; j<1000000; j++); //short delay here //initialize USB usbSetup(); //if we made it this far, blink to show health status_led(HEALTHY); while (1) /* Loop forever */ { //Allow USB to send information if any needs to be send SendNextBulkIn(BULK_IN_EP); } }
int main(void) { // Bring all Outputs Low LATB = 0x0000; LATD = 0x0000; LATF = 0x0000; LATG = 0x0000; // Disable analog I/O on PORT B and G ANSB = 0x0000; ANSG = 0x0000; // Setup the GPS and USB UART usbSetup(); gpsSetup(); gsmSetup(); sdSetup(); // Clear and enable GSM and USB interrupts U1RX_Clear_Intr_Status_Bit; U3RX_Clear_Intr_Status_Bit; EnableIntU1RX; EnableIntU3RX; // Clear and enable GPS interrupt // U2RX_Clear_Intr_Status_Bit; // EnableIntU2RX; // Set up to echo GPS data // sendCommand(PMTK_SET_BAUD_9600); // DELAY_MS(100); // sendCommand(PMTK_SET_NMEA_OUTPUT_RMCONLY); // sendCommand(PMTK_SET_NMEA_OUTPUT_OFF); // Enable for log dump // DELAY_MS(100); // sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); // Disable for log dump // DELAY_MS(100); // Start GPS data logger // startLOCUS(); strToUSB("Starting SM5100B Communication...\n"); // Loop Forever while(1) { blink(LED_GRN_P42); DELAY_MS(1000); // Print out logger info // displayLOCUSInfo(); } // Disable Interrupts and close UART DisableIntU1RX; DisableIntU2RX; DisableIntU3RX; CloseUART1(); CloseUART2(); CloseUART3(); }