Пример #1
0
int main( void )
{
	/* Configure any generic parameters needed to run the demo. */
	prvSetupHardware();

	/* Start the timers that demonstrate FreeRTOS software timers and basic
	GPIO functionality. */
	vGPIOSoftwareTimersStart();

	/* Start the task that demonstrates the SPI port being used to implement a
	disk IO interface to an SD card. */
//	vStartSPIInterfaceToSDCardTask();

	/* This call creates the TCP/IP thread. */
	tcpip_init( lwIPAppsInit, NULL );

	/* Register two command line commands to show task stats and run time stats
	respectively. */
	FreeRTOS_CLIRegisterCommand( &xTaskStats );
	FreeRTOS_CLIRegisterCommand( &xRunTimeStats );

	/* Start the FreeRTOS scheduler. */
	vTaskStartScheduler();

	/* The following line should never execute.  If it does, it means there was
	insufficient FreeRTOS heap memory available to create the Idle and/or timer
	tasks.  See the memory management section on the http://www.FreeRTOS.org web
	site for more information. */
	for( ;; );
}
Пример #2
0
int main( void )
{
	/* The examples assume that all priority bits are assigned as preemption
	priority bits. */
	NVIC_SetPriorityGrouping( 0UL );

	/* Start the timers that demonstrate FreeRTOS software timers and basic
	GPIO functionality. */
	vGPIOSoftwareTimersStart();

	/* Start the tasks that implements the command console on the UART, as
	described above. */
	vUARTCommandConsoleStart();

	/* Start the task that demonstrates the SSP port being used in SPI mode to
	write to the 7 segment display. */
	vSPIWriteTaskStart();

	/* Start the task that uses an I2C peripheral to communicate with the
	OLED and the EEPROM. */
	vI2CTaskStart();

	/* Register two command line commands to show task stats and run time stats
	respectively. */
	vRegisterCLICommands();

	/* Start the FreeRTOS scheduler. */
	vTaskStartScheduler();

	/* The following line should never execute.  If it does, it means there was
	insufficient FreeRTOS heap memory available to create the Idle and/or timer
	tasks.  See the memory management section on the http://www.FreeRTOS.org web
	site for more information. */
	for( ;; );
}