Ejemplo n.º 1
0
int main(void)
{
	disable_global_int();
	init_clk_system();
	init_gpio();
	init_status_led();
	init_spi();
	systick_init();
	enable_global_int();
	INT8U counter = 0;

	while(1)
	{
		/* System part of the super loop. */
		while(!ticks);
		// The following will be executed every 5mS
		ticks--;
		
		if (!--alive_timer)
		{
			alive_timer = TIM_500_MSEC;
			GPIO_PORTF_DATA_R ^= 0x01;
			SSI0_DR_R = counter++;		// Send this through SPI
		}
		/* Application part of the super loop. */
		//counter = SSI0_SR_R;
	}
	return (0);
}
Ejemplo n.º 2
0
/* 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);
  }										   
}