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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? port.c

?? FreeRtos Source code Version 4.04
?? C
字號:
/*
	FreeRTOS.org V4.0.4 - 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.
	***************************************************************************
*/


/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for the ARM7 port.
 *
 * Components that can be compiled to either ARM or THUMB mode are
 * contained in this file.  The ISR routines, which can only be compiled
 * to ARM mode are contained in portISR.c.
 *----------------------------------------------------------*/

/*
	Changes from V2.5.2
		
	+ ulCriticalNesting is now saved as part of the task context, as is 
	  therefore added to the initial task stack during pxPortInitialiseStack.

	Changes from V3.2.2

	+ Bug fix - The prescale value for the timer setup is now written to T0_PR 
	  instead of T0_PC.  This bug would have had no effect unless a prescale 
	  value was actually used.
*/


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

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

/* Constants required to setup the task context. */
#define portINITIAL_SPSR				( ( portSTACK_TYPE ) 0x1f ) /* System mode, ARM mode, interrupts enabled. */
#define portTHUMB_MODE_BIT				( ( portSTACK_TYPE ) 0x20 )
#define portINSTRUCTION_SIZE			( ( portSTACK_TYPE ) 4 )
#define portNO_CRITICAL_SECTION_NESTING	( ( portSTACK_TYPE ) 0 )

/* Constants required to setup the tick ISR. */
#define portENABLE_TIMER			( ( unsigned portCHAR ) 0x01 )
#define portPRESCALE_VALUE			0x00
#define portINTERRUPT_ON_MATCH		( ( unsigned portLONG ) 0x01 )
#define portRESET_COUNT_ON_MATCH	( ( unsigned portLONG ) 0x02 )

/* Constants required to setup the VIC for the tick ISR. */
#define portTIMER_VIC_CHANNEL		( ( unsigned portLONG ) 0x0004 )
#define portTIMER_VIC_CHANNEL_BIT	( ( unsigned portLONG ) 0x0010 )
#define portTIMER_VIC_ENABLE		( ( unsigned portLONG ) 0x0020 )

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

/* Setup the timer to generate the tick interrupts. */
static void prvSetupTimerInterrupt( void );

/* 
 * The scheduler can only be started from ARM mode, so 
 * vPortISRStartFirstSTask() is defined in portISR.c. 
 */
extern void vPortISRStartFirstTask( void );

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

/* 
 * Initialise the stack of a task to look exactly as if a call to 
 * portSAVE_CONTEXT had been called.
 *
 * See header file for description. 
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{
portSTACK_TYPE *pxOriginalTOS;

	pxOriginalTOS = pxTopOfStack;

	/* Setup the initial stack of the task.  The stack is set exactly as 
	expected by the portRESTORE_CONTEXT() macro. */

	/* First on the stack is the return address - which in this case is the
	start of the task.  The offset is added to make the return address appear
	as it would within an IRQ ISR. */
	*pxTopOfStack = ( portSTACK_TYPE ) pxCode + portINSTRUCTION_SIZE;		
	pxTopOfStack--;

	*pxTopOfStack = ( portSTACK_TYPE ) 0xaaaaaaaa;	/* R14 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) pxOriginalTOS; /* Stack used when task starts goes in R13. */
	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) 0x12121212;	/* R12 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x11111111;	/* R11 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x10101010;	/* R10 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x09090909;	/* R9 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x08080808;	/* R8 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x07070707;	/* R7 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x06060606;	/* R6 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x05050505;	/* R5 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x04040404;	/* R4 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x03030303;	/* R3 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x02020202;	/* R2 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x01010101;	/* R1 */
	pxTopOfStack--;	

	/* When the task starts is will expect to find the function parameter in
	R0. */
	*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R0 */
	pxTopOfStack--;

	/* The last thing onto the stack is the status register, which is set for
	system mode, with interrupts enabled. */
	*pxTopOfStack = ( portSTACK_TYPE ) portINITIAL_SPSR;

	#ifdef THUMB_INTERWORK
	{
		/* We want the task to start in thumb mode. */
		*pxTopOfStack |= portTHUMB_MODE_BIT;
	}
	#endif

	pxTopOfStack--;

	/* Some optimisation levels use the stack differently to others.  This 
	means the interrupt flags cannot always be stored on the stack and will
	instead be stored in a variable, which is then saved as part of the
	tasks context. */
	*pxTopOfStack = portNO_CRITICAL_SECTION_NESTING;

	return pxTopOfStack;
}
/*-----------------------------------------------------------*/

portBASE_TYPE xPortStartScheduler( void )
{
	/* Start the timer that generates the tick ISR.  Interrupts are disabled
	here already. */
	prvSetupTimerInterrupt();

	/* Start the first task. */
	vPortISRStartFirstTask();	

	/* Should not get here! */
	return 0;
}
/*-----------------------------------------------------------*/

void vPortEndScheduler( void )
{
	/* It is unlikely that the ARM port will require this function as there
	is nothing to return to.  */
}
/*-----------------------------------------------------------*/

/*
 * Setup the timer 0 to generate the tick interrupts at the required frequency.
 */
static void prvSetupTimerInterrupt( void )
{
unsigned portLONG ulCompareMatch;

	/* A 1ms tick does not require the use of the timer prescale.  This is
	defaulted to zero but can be used if necessary. */
	T0_PR = portPRESCALE_VALUE;

	/* Calculate the match value required for our wanted tick rate. */
	ulCompareMatch = configCPU_CLOCK_HZ / configTICK_RATE_HZ;

	/* Protect against divide by zero.  Using an if() statement still results
	in a warning - hence the #if. */
	#if portPRESCALE_VALUE != 0
	{
		ulCompareMatch /= ( portPRESCALE_VALUE + 1 );
	}
	#endif
	T0_MR0 = ulCompareMatch;

	/* Generate tick with timer 0 compare match. */
	T0_MCR = portRESET_COUNT_ON_MATCH | portINTERRUPT_ON_MATCH;

	/* Setup the VIC for the timer. */
	VICIntSelect &= ~( portTIMER_VIC_CHANNEL_BIT );
	VICIntEnable |= portTIMER_VIC_CHANNEL_BIT;
	
	/* The ISR installed depends on whether the preemptive or cooperative
	scheduler is being used. */
	#if configUSE_PREEMPTION == 1
	{
		extern void ( vPreemptiveTick )( void );
		VICVectAddr0 = ( portLONG ) vPreemptiveTick;
	}
	#else
	{
		extern void ( vNonPreemptiveTick )( void );
		VICVectAddr0 = ( portLONG ) vNonPreemptiveTick;
	}
	#endif

	VICVectCntl0 = portTIMER_VIC_CHANNEL | portTIMER_VIC_ENABLE;

	/* Start the timer - interrupts are disabled when this function is called
	so it is okay to do this here. */
	T0_TCR = portENABLE_TIMER;
}
/*-----------------------------------------------------------*/



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区电影| 26uuu欧美| 国产精品乱人伦| 亚洲福利视频三区| 亚洲福利电影网| 国产一区二区网址| 欧美日韩卡一卡二| 国产精品欧美一区二区三区| 免费观看91视频大全| 欧美亚洲高清一区二区三区不卡| 精品久久国产字幕高潮| 亚洲高清视频中文字幕| 成人国产视频在线观看| 精品免费视频.| 天天色综合成人网| 91精品办公室少妇高潮对白| 国产视频一区在线播放| 精品一区二区av| 69堂亚洲精品首页| 亚洲成精国产精品女| 91麻豆精品视频| 综合色天天鬼久久鬼色| 国产精品18久久久| 2020国产精品久久精品美国| 美腿丝袜亚洲一区| 欧美一区二区三区在线观看视频 | 亚洲麻豆国产自偷在线| 丰满亚洲少妇av| 久久免费电影网| 精品亚洲成a人| 精品欧美乱码久久久久久 | 在线视频你懂得一区二区三区| 久久久精品免费观看| 久久99精品国产麻豆不卡| 日韩精品一区二区三区蜜臀| 美女视频黄 久久| 精品久久久久久久人人人人传媒| 免费成人你懂的| 久久综合九色综合97婷婷女人| 美女视频免费一区| 久久久久久久久久美女| 国产成人免费网站| 亚洲天堂免费看| 欧美色精品天天在线观看视频| 亚洲一二三区不卡| 6080午夜不卡| 国产乱对白刺激视频不卡| 夜夜操天天操亚洲| 色婷婷精品久久二区二区蜜臀av| 亚洲精品日日夜夜| 欧美丰满一区二区免费视频| 日韩影院精彩在线| 久久综合五月天婷婷伊人| 国产 欧美在线| 一级精品视频在线观看宜春院| 欧美色涩在线第一页| 精品在线一区二区| 最新欧美精品一区二区三区| 欧美无人高清视频在线观看| 日韩av一级电影| 久久精品人人做人人爽97 | 极品美女销魂一区二区三区免费| 2023国产一二三区日本精品2022| 成人精品免费看| 午夜影院在线观看欧美| 久久综合色8888| 日本久久精品电影| 秋霞国产午夜精品免费视频| 国产精品久久久久一区二区三区共| 色噜噜狠狠一区二区三区果冻| 日本怡春院一区二区| 国产日产欧美一区| 欧美日韩国产综合视频在线观看| 国产麻豆精品theporn| 亚洲愉拍自拍另类高清精品| 日韩午夜激情av| 色就色 综合激情| 国产精品一区二区黑丝| 午夜视频在线观看一区二区| 国产丝袜在线精品| 欧美欧美欧美欧美首页| 99视频热这里只有精品免费| 免费观看久久久4p| 亚洲精品综合在线| 久久久久久久久久久久久夜| 欧美日韩中文字幕一区二区| 国产1区2区3区精品美女| 日本麻豆一区二区三区视频| 亚洲精品免费视频| 国产日韩av一区二区| 日韩欧美一区二区免费| 欧美在线一二三| 99r国产精品| 国产宾馆实践打屁股91| 看片的网站亚洲| 午夜精品福利一区二区蜜股av | 成人黄色一级视频| 久久丁香综合五月国产三级网站| 亚洲二区在线观看| 亚洲蜜桃精久久久久久久| 国产色综合一区| 精品嫩草影院久久| 日韩久久免费av| 91麻豆精品国产自产在线| 在线亚洲+欧美+日本专区| 91美女片黄在线观看91美女| 高清久久久久久| 国产乱人伦精品一区二区在线观看 | 麻豆视频观看网址久久| 亚洲chinese男男1069| 亚洲精品国产精华液| 亚洲欧美色综合| 亚洲乱码国产乱码精品精可以看| 亚洲视频在线一区观看| 亚洲图片激情小说| 一区二区欧美国产| 亚洲美女在线一区| 亚洲国产精品视频| 午夜精品久久久| 日韩av一区二区在线影视| 日本欧美加勒比视频| 另类专区欧美蜜桃臀第一页| 国产综合色视频| 国产精品自拍av| 波多野结衣在线aⅴ中文字幕不卡| 成人精品视频.| 日本高清不卡视频| 欧美精品在线一区二区三区| 日韩一区二区三区在线观看| 日韩三级在线免费观看| 久久免费午夜影院| 国产精品人人做人人爽人人添| 国产精品不卡在线观看| 亚洲美女视频在线观看| 日韩专区中文字幕一区二区| 久久 天天综合| 不卡电影一区二区三区| 在线视频亚洲一区| 欧美酷刑日本凌虐凌虐| xfplay精品久久| 亚洲视频小说图片| 天堂av在线一区| 国产剧情一区在线| 91精品91久久久中77777| 欧美日韩国产三级| 久久亚洲捆绑美女| 亚洲男同性恋视频| 久久精品国产色蜜蜜麻豆| 成人av一区二区三区| 欧美福利视频导航| 欧美国产日韩亚洲一区| 一区二区三区不卡视频| 黄色资源网久久资源365| 欧美一区二区三区男人的天堂| 日韩欧美精品在线视频| 中文字幕一区在线观看视频| 日韩电影在线观看电影| 粉嫩av一区二区三区粉嫩| 欧美日韩一区二区在线观看| 久久精品夜夜夜夜久久| 性感美女久久精品| 成人免费看的视频| 日韩三级视频在线看| 亚洲精品美国一| 国产成人啪午夜精品网站男同| 欧美日韩三级一区二区| 国产欧美日韩在线| 男男视频亚洲欧美| 91黄色免费观看| 欧美国产综合色视频| 麻豆视频一区二区| 欧美日韩精品欧美日韩精品| 中文字幕不卡一区| 精品一区二区精品| 欧美老肥妇做.爰bbww视频| 亚洲欧美偷拍卡通变态| 国产高清无密码一区二区三区| 91精品国产91久久久久久最新毛片 | 樱花草国产18久久久久| 高清不卡一区二区| 欧美电影免费提供在线观看| 亚洲一区二区偷拍精品| 99re这里只有精品首页| 国产亚洲女人久久久久毛片| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美在线影院一区二区| 亚洲乱码国产乱码精品精可以看 | 色琪琪一区二区三区亚洲区| 久久色.com| 久久精品国产一区二区三| 欧美丰满嫩嫩电影| 亚洲成年人影院| 欧美日韩成人高清| 亚洲国产综合91精品麻豆| 91麻豆高清视频| 亚洲美女屁股眼交3| 91福利国产精品| 一区二区三区毛片| 欧美性感一区二区三区| 亚洲午夜精品17c|