亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? main.c

?? 最新版FreeRTOS, 包擴多種開發(fā)平臺的移植
?? C
字號:
/*
	FreeRTOS.org V4.1.1 - copyright (C) 2003-2006 Richard Barry.

	This file is part of the FreeRTOS.org distribution.

	FreeRTOS.org is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	FreeRTOS.org is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with FreeRTOS.org; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

	A special exception to the GPL can be applied should you wish to distribute
	a combined work that includes FreeRTOS.org, without being obliged to provide
	the source code for any proprietary components.  See the licensing section
	of http://www.FreeRTOS.org for full details of how and when the exception
	can be applied.

	***************************************************************************
	See http://www.FreeRTOS.org for documentation, latest information, license
	and contact details.  Please ensure to read the configuration and relevant
	port sections of the online documentation.
	***************************************************************************
*/

/*
 * Creates all the application tasks, then starts the scheduler.
 *
 * A task is also created called "uIP".  This executes the uIP stack and small
 * WEB server sample.  All the other tasks are from the set of standard
 * demo tasks.  The WEB documentation provides more details of the standard
 * demo application tasks.
 *
 * Main.c also creates a task called "Check".  This only executes every three
 * seconds but has the highest priority so is guaranteed to get processor time.
 * Its main function is to check the status of all the other demo application
 * tasks.  LED mainCHECK_LED is toggled every three seconds by the check task
 * should no error conditions be detected in any of the standard demo tasks.
 * The toggle rate increasing to 500ms indicates that at least one error has
 * been detected.
 */


/* Standard includes. */
#include <stdlib.h>
#include <string.h>

/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"

/* Demo application includes. */
#include "partest.h"
#include "PollQ.h"
#include "dynamic.h"
#include "semtest.h"
#include "flash.h"
#include "integer.h"
#include "flop.h"
#include "BlockQ.h"
#include "death.h"
#include "uip_task.h"

/*-----------------------------------------------------------*/

/* Priorities/stacks for the demo application tasks. */
#define mainQUEUE_POLL_PRIORITY		( tskIDLE_PRIORITY + 1 )
#define mainCHECK_TASK_PRIORITY		( tskIDLE_PRIORITY + 3 )
#define mainSEM_TEST_PRIORITY		( tskIDLE_PRIORITY + 1 )
#define mainUIP_PRIORITY			( tskIDLE_PRIORITY + 3 )
#define mainFLASH_PRIORITY			( tskIDLE_PRIORITY + 2 )
#define mainBLOCK_Q_PRIORITY		( tskIDLE_PRIORITY + 1 )
#define mainDEATH_PRIORITY			( tskIDLE_PRIORITY + 2 )
#define mainUIP_TASK_STACK_SIZE		( 250 )

/* The rate at which the on board LED will toggle when there is/is not an
error. */
#define mainNO_ERROR_FLASH_PERIOD	( ( portTickType ) 3000 / portTICK_RATE_MS  )
#define mainERROR_FLASH_PERIOD		( ( portTickType ) 500 / portTICK_RATE_MS  )

/* The LED used by the check task to indicate the system status. */
#define mainCHECK_LED 				( 3 )
/*-----------------------------------------------------------*/

/*
 * Checks that all the demo application tasks are still executing without error
 * - as described at the top of the file.
 */
static portLONG prvCheckOtherTasksAreStillRunning( void );

/*
 * The task that executes at the highest priority and calls
 * prvCheckOtherTasksAreStillRunning().  See the description at the top
 * of the file.
 */
static void vErrorChecks( void *pvParameters );

/*
 * Configure the processor for use with the Atmel demo board.  This is very
 * minimal as most of the setup is performed in the startup code.
 */
static void prvSetupHardware( void );

/*-----------------------------------------------------------*/

/*
 * Starts all the other tasks, then starts the scheduler.
 */
int main( void )
{
	/* Configure the processor. */
	prvSetupHardware();

	/* Setup the port used to flash the LED's. */
	vParTestInitialise();

	/* Start the task that handles the TCP/IP and WEB server functionality. */
    xTaskCreate( vuIP_TASK, "uIP", mainUIP_TASK_STACK_SIZE, NULL, mainUIP_PRIORITY, NULL );
	
	/* Start the demo/test application tasks.  These are created in addition
	to the TCP/IP task for demonstration and test purposes. */
	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
	vStartDynamicPriorityTasks();
	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
	vStartLEDFlashTasks( mainFLASH_PRIORITY );
	vStartIntegerMathTasks( tskIDLE_PRIORITY );
	vStartMathTasks( tskIDLE_PRIORITY );
	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );

	/* Start the check task - which is defined in this file. */	
    xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );

	/* Must be last to get created. */
	vCreateSuicidalTasks( mainDEATH_PRIORITY );

	/* Now all the tasks have been started - start the scheduler. */
	vTaskStartScheduler();

	/* Should never reach here because the tasks should now be executing! */
	return 0;
}
/*-----------------------------------------------------------*/

static void prvSetupHardware( void )
{
	/* When using the JTAG debugger the hardware is not always initialised to
	the correct default state.  This line just ensures that this does not
	cause all interrupts to be masked at the start. */
	AT91C_BASE_AIC->AIC_EOICR = 0;
	
	/* Most setup is performed by the low level init function called from the
	startup asm file.

	Configure the PIO Lines corresponding to LED1 to LED4 to be outputs as
	well as the UART Tx line. */
	AT91F_PIO_CfgOutput( AT91C_BASE_PIOB, LED_MASK );

	/* Enable the peripheral clock. */
	AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
	AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_PIOB ) ;
	AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_EMAC ) ;
}
/*-----------------------------------------------------------*/

static void vErrorChecks( void *pvParameters )
{
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
portTickType xLastWakeTime;

	/* Initialise xLastWakeTime to ensure the first call to vTaskDelayUntil()
	functions correctly. */
	xLastWakeTime = xTaskGetTickCount();

	/* Cycle for ever, delaying then checking all the other tasks are still
	operating without error.  If an error is detected then the delay period
	is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so
	the Check LED flash rate will increase. */
	for( ;; )
	{
		/* Delay until it is time to execute again.  The delay period is
		shorter following an error. */
		vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );
	
		/* Check all the standard demo application tasks are executing without
		error.  */
		if( prvCheckOtherTasksAreStillRunning() != pdPASS )
		{
			/* An error has been detected in one of the tasks - flash faster. */
			xDelayPeriod = mainERROR_FLASH_PERIOD;
		}

		vParTestToggleLED( mainCHECK_LED );
	}
}
/*-----------------------------------------------------------*/

static portLONG prvCheckOtherTasksAreStillRunning( void )
{
portLONG lReturn = ( portLONG ) pdPASS;


	/* Check all the demo tasks (other than the flash tasks) to ensure
	that they are all still running, and that none of them have detected
	an error. */

	if( xArePollingQueuesStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	if( xAreSemaphoreTasksStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	if( xAreMathsTaskStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	if( xAreBlockingQueuesStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	if( xIsCreateTaskStillRunning() != pdTRUE )
	{
		lReturn = ( portLONG ) pdFAIL;
	}

	return lReturn;
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美揉bbbbb揉bbbbb| 亚洲夂夂婷婷色拍ww47| 亚洲一区二区三区在线| 老鸭窝一区二区久久精品| 99久久久无码国产精品| 日韩美女视频一区二区在线观看| 亚洲欧美一区二区三区极速播放| 美女国产一区二区| 色天使久久综合网天天| 国产精品毛片高清在线完整版| 免费看精品久久片| 欧美日韩高清影院| 亚洲综合成人在线视频| 99久久久无码国产精品| 国产精品美女久久久久aⅴ国产馆| 麻豆精品视频在线观看| 制服丝袜av成人在线看| 亚洲美女免费视频| 91在线观看免费视频| 国产日韩视频一区二区三区| 国产在线播放一区二区三区| 日韩欧美一区在线| 日韩高清国产一区在线| 欧美高清www午色夜在线视频| 亚洲精品免费在线| av网站一区二区三区| 国产精品三级av| 成人丝袜高跟foot| 国产精品女主播av| 99精品欧美一区二区蜜桃免费| 国产视频在线观看一区二区三区 | 精品久久久久香蕉网| 午夜精品久久久久久久久| 欧美在线制服丝袜| 亚洲已满18点击进入久久| 色偷偷久久一区二区三区| 一本久道久久综合中文字幕| 99国产精品久| 久久精品一区二区| 国模大尺度一区二区三区| 26uuu另类欧美亚洲曰本| 精品一区二区三区影院在线午夜| 日韩欧美一区二区三区在线| 激情小说欧美图片| 国产精品日韩精品欧美在线| 成人黄色在线视频| 亚洲一区免费观看| 欧美一区二区视频在线观看 | 欧美电影免费观看高清完整版在 | 国产精品系列在线观看| 欧美国产乱子伦| 色婷婷国产精品久久包臀| 亚洲国产一区二区在线播放| 国产日韩精品一区二区浪潮av| 国产91丝袜在线观看| 亚洲人成精品久久久久久| 欧美影片第一页| 久草热8精品视频在线观看| 国产精品日韩成人| 88在线观看91蜜桃国自产| 国产自产v一区二区三区c| 中文字幕亚洲一区二区va在线| 日本韩国精品一区二区在线观看| 偷窥少妇高潮呻吟av久久免费| 精品国产乱码久久久久久夜甘婷婷| 国产精品一区二区x88av| 亚洲激情校园春色| 日韩女优电影在线观看| av欧美精品.com| 日韩和欧美的一区| 国产午夜亚洲精品羞羞网站| 91久久精品一区二区| 奇米影视在线99精品| 综合色中文字幕| 日韩一区二区三区电影在线观看| 国产精品亚洲а∨天堂免在线| 亚洲精品五月天| 久久久亚洲高清| 欧美日韩日本视频| 99久久精品情趣| 韩国av一区二区三区在线观看| 亚洲黄色片在线观看| 久久精品人人做| 欧美一卡二卡在线| 欧美主播一区二区三区美女| 国产成人综合在线| 蜜臀av性久久久久蜜臀av麻豆| 亚洲欧美一区二区三区久本道91| xvideos.蜜桃一区二区| 欧美一区二区三区啪啪| 色综合一区二区| 风间由美一区二区三区在线观看 | 精品av综合导航| 欧美老肥妇做.爰bbww| 色综合久久久久综合体桃花网| 精品一区二区三区的国产在线播放| 亚洲综合色在线| 一区在线中文字幕| 国产精品久久久久久久久搜平片| 欧美大片顶级少妇| 日韩视频免费直播| 欧美丰满少妇xxxxx高潮对白| 91精品办公室少妇高潮对白| 99久久精品国产精品久久| 国产91丝袜在线播放| 国产成人自拍网| 国产一区二区女| 国产高清精品网站| 国产伦精品一区二区三区视频青涩 | 国产精品麻豆视频| 欧美国产禁国产网站cc| 国产亚洲欧美中文| 中文字幕欧美国产| 国产精品午夜春色av| 国产精品国产三级国产普通话蜜臀 | 国内外成人在线视频| 精品一区二区成人精品| 久久精品国产免费| 狠狠色丁香久久婷婷综合丁香| 久久国产免费看| 国产高清久久久| 成人高清免费观看| 97精品超碰一区二区三区| 91麻豆福利精品推荐| 在线视频你懂得一区| 欧美精选一区二区| 日韩欧美中文字幕制服| 久久精品一区四区| |精品福利一区二区三区| 亚洲精品国产视频| 日韩国产高清在线| 国产麻豆午夜三级精品| 成人h动漫精品一区二区| 91成人网在线| 欧美一级高清大全免费观看| 久久久www成人免费无遮挡大片| 国产精品污www在线观看| 亚洲欧美另类在线| 日本中文字幕不卡| 国产激情视频一区二区三区欧美| 成人网男人的天堂| 欧美日韩黄色影视| 国产日产欧美一区二区视频| 亚洲老司机在线| 日韩av一级电影| 成人国产精品免费网站| 欧美日韩视频不卡| wwww国产精品欧美| 亚洲激情五月婷婷| 国产老妇另类xxxxx| 91麻豆蜜桃一区二区三区| 日韩天堂在线观看| 自拍偷在线精品自拍偷无码专区| 日韩电影在线观看一区| 成人免费视频网站在线观看| 欧美巨大另类极品videosbest | 国产亚洲一区二区三区四区| 亚洲欧美影音先锋| 免费观看一级特黄欧美大片| eeuss国产一区二区三区| 91精品婷婷国产综合久久性色| 欧美国产1区2区| 男人的j进女人的j一区| 不卡的av网站| 久久综合久久99| 亚洲成人动漫av| 99久久综合国产精品| 久久人人97超碰com| 五月综合激情婷婷六月色窝| 成人动漫精品一区二区| 日韩一区二区三区在线观看 | 中文字幕乱码日本亚洲一区二区 | 亚洲高清在线精品| 成人国产视频在线观看| 精品国产一区二区三区久久影院| 亚洲成人av电影| 色综合久久中文综合久久牛| 国产拍欧美日韩视频二区| 免费在线视频一区| 欧美日韩1区2区| 亚洲一区二区三区四区的| aaa亚洲精品| 国产精品网曝门| 国产精品中文字幕一区二区三区| 欧美一卡二卡三卡| 亚洲成人动漫在线免费观看| 欧日韩精品视频| 亚洲精品写真福利| 91同城在线观看| 国产精品理论片| 成人av影视在线观看| 国产欧美日韩视频一区二区| 国产美女视频91| 精品美女在线观看| 精品在线视频一区| 欧美精品一区二区三区高清aⅴ| 日韩成人免费在线| 日韩欧美一级二级三级久久久| 日韩精品电影一区亚洲| 欧美一区二区网站|