コード例 #1
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);
  }										   
}
コード例 #2
0
ファイル: fn_engine.cpp プロジェクト: Asmodean-/Vulkan
VkBool32 VKTS_APIENTRY engineInit()
{
    if (!processorInit())
    {
        VKTS_PRINTF("LOG [VKTS_LOG_ERROR]: Engine: Initialization failed! Could not initialize the processor!\n");

        return VK_FALSE;
    }

    if (!logInit())
    {
        VKTS_PRINTF("LOG [VKTS_LOG_ERROR]: Engine: Initialization failed! Could not initialize logging.\n");

        return VK_FALSE;
    }

    if (!timeInit())
    {
        logPrint(VKTS_LOG_ERROR, "Engine: Initialization failed! Could not initialize the timer!");

        return VK_FALSE;
    }

    if (!barrierInit())
    {
        logPrint(VKTS_LOG_ERROR, "Engine: Initialization failed! Could not initialize the barrier!");

        return VK_FALSE;
    }

    if (!fileInit())
    {
        logPrint(VKTS_LOG_ERROR, "Engine: Initialization failed! Could not initialize the file system!");

        return VK_FALSE;
    }

    return VK_TRUE;
}
コード例 #3
0
int main(void)
{
    // initialize processor
    processorInit();
    // initialize timers
    timerInit();
    // initialize uarts
    uart0Init(UART_BAUD(115200), UART_8N1, UART_FIFO_8);
    uart1Init(UART_BAUD(115200), UART_8N1, UART_FIFO_8);
    // initialize rprintf to use UART1 for output
    rprintfInit(uart1SendByte);

    // Wait for a moment to allow hardware to stabilize.
    // This may be important if a serial port level-converter
    // like the MAX232 is used.  Charge-pump based converters
    // need some time after power-up to charge before
    // communication is reliable.
    timerPause(50);		// waits 50 milliseconds

    // run the test
    uartTest();

    return 0;
}