示例#1
0
/***************************************************************************************************************************
 ****************************************************************************************************************************
														MAIN PROGRAM														
 ****************************************************************************************************************************
 ***************************************************************************************************************************/
int main(void) {

	NP2_boardinit();
	Hardware_init();
	Hardware_PWM_init();

	/* Initilaize the LwIP stack */
	LwIP_Init();

	/* Create all tasks */
	xTaskCreate( (void *) &PanTiltTask, (const signed char *) "PanTilt", PANTILTTASK_STACK_SIZE, NULL, PANTILTTASK_PRIORITY, &xPanTiltTask);
	xTaskCreate( (void *) &DistanceTask, (const signed char *) "Dist", DISTANCETASK_STACK_SIZE, NULL, DISTANCETASK_PRIORITY, &xDistanceTask);
	xTaskCreate( (void *) &CLITask, (const signed char *) "CLI", CLI_TASK_STACK_SIZE, NULL, CLI_PRIORITY, &xCLITask);

	/* Register all CMDs */
	FreeRTOS_CLIRegisterCommand(&xTaskUsage);
	FreeRTOS_CLIRegisterCommand(&xEncode);
	FreeRTOS_CLIRegisterCommand(&xDecode);
	FreeRTOS_CLIRegisterCommand(&xLaser);
	FreeRTOS_CLIRegisterCommand(&xDistance);
	FreeRTOS_CLIRegisterCommand(&xTracking);

	/* Start scheduler */
	vTaskStartScheduler();

	return 0;
}
示例#2
0
/**
  * @brief  Main program - enable D0 external interrupt.
  * @param  None
  * @retval None
  */
void main(void) {
	
	NP2_boardinit();	//Initalise NP2
	Hardware_init();	//Initalise hardware modules
  	
	/* Main processing loop waiting for interrupt */
    while (1) {
  	}

}
示例#3
0
/**
  * @brief  Main program
  * @param  None
  * @retval None
  */
void main(void) {

	NP2_boardinit();	//Initalise NP2
	Hardware_init();	//Initalise hardware modules

  	while (1) {

		NP2_LEDToggle();	//Toggle 'Alive' LED on/off
    	Delay(0x7FFF00);	//Delay function
	}
}