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

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

?? port.c

?? MCS-51的一個Free小型操作系統,在KeilC中下編譯工作
?? C
字號:
/* 
	FreeRTOS.org V4.1.3 - 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.
	***************************************************************************
*/

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


/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for the HCS12 port.
 *----------------------------------------------------------*/


/*
 * Configure a timer to generate the RTOS tick at the frequency specified 
 * within FreeRTOSConfig.h.
 */
static void prvSetupTimerInterrupt( void );

/* Interrupt service routines have to be in non-banked memory - as does the
scheduler startup function. */
#pragma CODE_SEG __NEAR_SEG NON_BANKED

	/* Manual context switch function.  This is the SWI ISR. */
	void interrupt vPortYield( void );

	/* Tick context switch function.  This is the timer ISR. */
	void interrupt vPortTickInterrupt( void );
	
	/* Simply called by xPortStartScheduler().  xPortStartScheduler() does not
	start the scheduler directly because the header file containing the 
	xPortStartScheduler() prototype is part of the common kernel code, and 
	therefore cannot use the CODE_SEG pragma. */
	static portBASE_TYPE xBankedStartScheduler( void );

#pragma CODE_SEG DEFAULT

/* Calls to portENTER_CRITICAL() can be nested.  When they are nested the 
critical section should not be left (i.e. interrupts should not be re-enabled)
until the nesting depth reaches 0.  This variable simply tracks the nesting 
depth.  Each task maintains it's own critical nesting depth variable so 
uxCriticalNesting is saved and restored from the task stack during a context
switch. */
volatile unsigned portBASE_TYPE uxCriticalNesting = 0xff;

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

/* 
 * See header file for description. 
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{
	/* 
		Place a few bytes of known values on the bottom of the stack.
		This can be uncommented to provide useful stack markers when debugging.

		*pxTopOfStack = ( portSTACK_TYPE ) 0x11;
		pxTopOfStack--;
		*pxTopOfStack = ( portSTACK_TYPE ) 0x22;
		pxTopOfStack--;
		*pxTopOfStack = ( portSTACK_TYPE ) 0x33;
		pxTopOfStack--;
	*/



	/* Setup the initial stack of the task.  The stack is set exactly as 
	expected by the portRESTORE_CONTEXT() macro.  In this case the stack as
	expected by the HCS12 RTI instruction. */


	/* The address of the task function is placed in the stack byte at a time. */
	*pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pxCode) ) + 1 );
	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pxCode) ) + 0 );
	pxTopOfStack--;

	/* Next are all the registers that form part of the task context. */

	/* Y register */
	*pxTopOfStack = ( portSTACK_TYPE ) 0xff;
	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) 0xee;
	pxTopOfStack--;

	/* X register */
	*pxTopOfStack = ( portSTACK_TYPE ) 0xdd;
	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) 0xcc;
	pxTopOfStack--;
 
	/* A register contains parameter high byte. */
	*pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pvParameters) ) + 0 );
	pxTopOfStack--;

	/* B register contains parameter low byte. */
	*pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pvParameters) ) + 1 );
	pxTopOfStack--;

	/* CCR: Note that when the task starts interrupts will be enabled since
	"I" bit of CCR is cleared */
	*pxTopOfStack = ( portSTACK_TYPE ) 0x00;
	pxTopOfStack--;
	
	#ifdef BANKED_MODEL
		/* The page of the task. */
		*pxTopOfStack = ( portSTACK_TYPE ) ( ( int ) pxCode );
		pxTopOfStack--;
	#endif
	
	/* Finally the critical nesting depth is initialised with 0 (not within
	a critical section). */
	*pxTopOfStack = ( portSTACK_TYPE ) 0x00;

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

void vPortEndScheduler( void )
{
	/* It is unlikely that the HCS12 port will get stopped. */
}
/*-----------------------------------------------------------*/

static void prvSetupTimerInterrupt( void )
{
	TickTimer_SetFreqHz( configTICK_RATE_HZ );
	TickTimer_Enable();
}
/*-----------------------------------------------------------*/

portBASE_TYPE xPortStartScheduler( void )
{
	/* xPortStartScheduler() does not start the scheduler directly because 
	the header file containing the xPortStartScheduler() prototype is part 
	of the common kernel code, and therefore cannot use the CODE_SEG pragma. 
	Instead it simply calls the locally defined xBankedStartScheduler() - 
	which does use the CODE_SEG pragma. */

	return xBankedStartScheduler();
}
/*-----------------------------------------------------------*/

#pragma CODE_SEG __NEAR_SEG NON_BANKED

static portBASE_TYPE xBankedStartScheduler( void )
{
	/* Configure the timer that will generate the RTOS tick.  Interrupts are
	disabled when this function is called. */
	prvSetupTimerInterrupt();

	/* Restore the context of the first task. */
	portRESTORE_CONTEXT();

	/* Simulate the end of an interrupt to start the scheduler off. */
	__asm( "rti" );

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

/*
 * Context switch functions.  These are both interrupt service routines.
 */

/*
 * Manual context switch forced by calling portYIELD().  This is the SWI
 * handler.
 */
void interrupt vPortYield( void )
{
	portSAVE_CONTEXT();
	vTaskSwitchContext();
	portRESTORE_CONTEXT();
}
/*-----------------------------------------------------------*/

/*
 * RTOS tick interrupt service routine.  If the cooperative scheduler is 
 * being used then this simply increments the tick count.  If the 
 * preemptive scheduler is being used a context switch can occur.
 */
void interrupt vPortTickInterrupt( void )
{
	#if configUSE_PREEMPTION == 1
	{
		/* A context switch might happen so save the context. */
		portSAVE_CONTEXT();

		/* Increment the tick ... */
		vTaskIncrementTick();

		/* ... then see if the new tick value has necessitated a
		context switch. */
		vTaskSwitchContext();

		TFLG1 = 1;								   

		/* Restore the context of a task - which may be a different task
		to that interrupted. */
		portRESTORE_CONTEXT();	
	}
	#else
	{
		vTaskIncrementTick();
		TFLG1 = 1;
	}
	#endif
}

#pragma CODE_SEG DEFAULT


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费观看视频在线| 亚洲人成网站在线| 激情综合网av| 久久色成人在线| 高清久久久久久| 国产精品精品国产色婷婷| 日本道在线观看一区二区| 亚洲一线二线三线视频| 欧美网站大全在线观看| 日本不卡1234视频| 国产亚洲婷婷免费| 高清在线成人网| 亚洲乱码中文字幕| 91精品国产一区二区三区蜜臀| 久久超碰97中文字幕| 久久噜噜亚洲综合| 97久久精品人人爽人人爽蜜臀 | 日韩欧美在线影院| 国产精品影音先锋| 亚洲精品久久久蜜桃| 欧美一区二区三区在线电影| 黄网站免费久久| 亚洲视频一区在线| 欧美一区二区三区系列电影| 国产精品亚洲人在线观看| 亚洲男人电影天堂| 日韩免费成人网| 成人a免费在线看| 天天影视网天天综合色在线播放| 国产欧美日韩一区二区三区在线观看| 东方aⅴ免费观看久久av| 一区二区三区小说| 欧美精品一区二区精品网| 色婷婷综合久久久中文一区二区| 日韩在线观看一区二区| 国产欧美一区二区精品婷婷| 欧美在线一二三四区| 韩国av一区二区| 亚洲欧美偷拍卡通变态| 精品久久久久久综合日本欧美| 91蝌蚪porny| 日韩 欧美一区二区三区| 国产精品每日更新在线播放网址| 欧美性受xxxx黑人xyx性爽| 国产露脸91国语对白| 亚洲成av人片在线| 中文字幕中文字幕一区二区| 欧美成人一级视频| 欧美日韩国产乱码电影| 99国内精品久久| 国产美女久久久久| 美女视频网站黄色亚洲| 亚洲成人动漫一区| 国产欧美一区二区三区网站| 在线不卡免费av| 色综合久久中文综合久久97 | 精品毛片乱码1区2区3区| 色综合天天综合色综合av| 精品一区二区三区久久| 亚洲成年人网站在线观看| 国产日韩欧美精品在线| 久久人人爽人人爽| 欧美一区二区三区视频在线观看| 在线一区二区视频| 91女厕偷拍女厕偷拍高清| 国产成人综合自拍| 老司机精品视频导航| 日韩精品免费专区| 国产夫妻精品视频| 日本视频一区二区三区| 日韩中文字幕av电影| 亚洲成人黄色小说| 亚洲影院在线观看| 亚洲综合久久久| 亚洲五码中文字幕| 亚洲成av人片一区二区三区| 亚洲一二三四区| 亚洲成人动漫一区| 视频一区二区三区中文字幕| 亚洲成av人综合在线观看| 亚洲超丰满肉感bbw| 午夜精品在线看| 日韩av在线发布| 久久精品国产成人一区二区三区| 免费精品视频最新在线| 精品在线视频一区| 国产一区二区主播在线| 国产成人精品影视| yourporn久久国产精品| 91麻豆国产自产在线观看| 在线视频一区二区免费| 69久久夜色精品国产69蝌蚪网| 宅男在线国产精品| www亚洲一区| 国产精品国产自产拍高清av王其| 日韩一区中文字幕| 亚洲电影第三页| 麻豆久久久久久| 国产ts人妖一区二区| 91在线精品秘密一区二区| 欧美色综合影院| 日韩一区二区三区在线视频| 久久久不卡网国产精品一区| 国产精品国产三级国产aⅴ无密码| 亚洲欧美一区二区不卡| 日本vs亚洲vs韩国一区三区二区 | 久久国产日韩欧美精品| 国产精品影视天天线| 一本一本大道香蕉久在线精品| 精品美女在线观看| 国产偷国产偷精品高清尤物 | 婷婷综合另类小说色区| 麻豆精品在线观看| 99久久er热在这里只有精品15| 欧美日韩一区二区在线观看视频 | 精品国产免费一区二区三区四区 | 一区二区三区在线播放| 日韩专区中文字幕一区二区| 国产经典欧美精品| 精品视频在线免费| 欧美国产日韩精品免费观看| 亚洲一区二区高清| 国产成人综合在线| 欧美日韩亚洲综合一区二区三区| 久久久久久久久久久久久女国产乱 | 国产一区二区三区高清播放| 91豆麻精品91久久久久久| 26uuu欧美| 亚洲国产成人av网| 成人在线一区二区三区| 日韩欧美中文字幕公布| 一区二区三区成人| 国产一区二区三区免费播放| 欧美三级三级三级爽爽爽| 亚洲国产精品精华液ab| 蜜臀va亚洲va欧美va天堂 | 在线电影欧美成精品| 国产精品久久久久久户外露出| 蜜桃视频免费观看一区| 91国在线观看| 国产精品国产a级| 国产综合色精品一区二区三区| 欧美日韩精品欧美日韩精品一综合| 国产午夜精品久久久久久免费视| 日本欧美在线观看| 欧美三级资源在线| 亚洲狠狠丁香婷婷综合久久久| 国产一区二区三区香蕉| 日韩欧美亚洲国产另类| 韩国欧美国产一区| 91精品在线观看入口| 亚洲女同一区二区| 99热这里都是精品| 中文字幕精品在线不卡| 国产一区二区在线免费观看| 日韩一区二区视频在线观看| 婷婷久久综合九色综合绿巨人| 91年精品国产| 亚洲欧美另类小说视频| 91一区二区在线| 亚洲人成小说网站色在线| 99精品久久久久久| 亚洲三级在线免费| 91女厕偷拍女厕偷拍高清| 亚洲免费视频中文字幕| 99精品一区二区三区| 国产精品久久久久久久久图文区| 成人精品国产一区二区4080| 国产精品色眯眯| 不卡电影一区二区三区| 中文字幕在线播放不卡一区| 99国产一区二区三精品乱码| 国产精品久久99| 日本高清不卡视频| 天堂一区二区在线| 日韩一级黄色片| 久久精品国产亚洲一区二区三区| 日韩视频免费直播| 激情综合网av| 国产精品伦一区二区三级视频| 99久久综合色| 亚洲国产日产av| 宅男在线国产精品| 精品一区二区免费| 中文字幕 久热精品 视频在线 | 奇米亚洲午夜久久精品| 精品999在线播放| 成人综合日日夜夜| 亚洲日本丝袜连裤袜办公室| 在线视频欧美精品| 美女国产一区二区三区| 国产偷国产偷精品高清尤物 | 蜜臀av一级做a爰片久久| 久久综合视频网| 99re热这里只有精品免费视频| 精品一区二区av| 国产日韩精品视频一区| av资源网一区| 午夜电影网亚洲视频| 久久久久久久综合色一本|