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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? port.c

?? FreeRTOSV3.2.0 經(jīng)典嵌入式操作系統(tǒng)
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*
	FreeRTOS V3.2.0 - Copyright (C) 2003 - 2005 Richard Barry.

	This file is part of the FreeRTOS distribution.

	FreeRTOS 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 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; 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, 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 Cygnal port.
 *----------------------------------------------------------*/

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

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

/* Constants required to setup timer 2 to produce the RTOS tick. */
#define portCLOCK_DIVISOR				( ( unsigned portLONG ) 12 )
#define portMAX_TIMER_VALUE				( ( unsigned portLONG ) 0xffff )
#define portENABLE_TIMER				( ( unsigned portCHAR ) 0x04 )
#define portTIMER_2_INTERRUPT_ENABLE	( ( unsigned portCHAR ) 0x20 )

/* The value used in the IE register when a task first starts. */
#define portGLOBAL_INTERRUPT_BIT	( ( portSTACK_TYPE ) 0x80 )

/* The value used in the PSW register when a task first starts. */
#define portINITIAL_PSW				( ( portSTACK_TYPE ) 0x00 )

/* Macro to clear the timer 2 interrupt flag. */
#define portCLEAR_INTERRUPT_FLAG()	TMR2CN &= ~0x80;

/* Used during a context switch to store the size of the stack being copied
to or from XRAM. */
data static unsigned portCHAR ucStackBytes;

/* Used during a context switch to point to the next byte in XRAM from/to which
a RAM byte is to be copied. */
xdata static portSTACK_TYPE * data pxXRAMStack;

/* Used during a context switch to point to the next byte in RAM from/to which
an XRAM byte is to be copied. */
data static portSTACK_TYPE * data pxRAMStack;

/* We require the address of the pxCurrentTCB variable, but don't want to know
any details of its type. */
typedef void tskTCB;
extern volatile tskTCB * volatile pxCurrentTCB;

/*
 * Setup the hardware to generate an interrupt off timer 2 at the required 
 * frequency.
 */
static void prvSetupTimerInterrupt( void );

/*-----------------------------------------------------------*/
/*
 * Macro that copies the current stack from internal RAM to XRAM.  This is 
 * required as the 8051 only contains enough internal RAM for a single stack, 
 * but we have a stack for every task.
 */
#define portCOPY_STACK_TO_XRAM()																\
{																								\
	/* pxCurrentTCB points to a TCB which itself points to the location into					\
	which the first	stack byte should be copied.  Set pxXRAMStack to point						\
	to the location into which the first stack byte is to be copied. */							\
	pxXRAMStack = ( xdata portSTACK_TYPE * ) *( ( xdata portSTACK_TYPE ** ) pxCurrentTCB );		\
																								\
	/* Set pxRAMStack to point to the first byte to be coped from the stack. */					\
	pxRAMStack = ( data portSTACK_TYPE * data ) configSTACK_START;								\
																								\
	/* Calculate the size of the stack we are about to copy from the current					\
	stack pointer value. */																		\
	ucStackBytes = SP - ( configSTACK_START - 1 );												\
																								\
	/* Before starting to copy the stack, store the calculated stack size so					\
	the stack can be restored when the task is resumed. */										\
	*pxXRAMStack = ucStackBytes;																\
																								\
	/* Copy each stack byte in turn.  pxXRAMStack is incremented first as we					\
	have already stored the stack size into XRAM. */											\
	while( ucStackBytes )																		\
	{																							\
		pxXRAMStack++;																			\
		*pxXRAMStack = *pxRAMStack;																\
		pxRAMStack++;																			\
		ucStackBytes--;																			\
	}																							\
}
/*-----------------------------------------------------------*/

/*
 * Macro that copies the stack of the task being resumed from XRAM into 
 * internal RAM.
 */
#define portCOPY_XRAM_TO_STACK()																\
{																								\
	/* Setup the pointers as per portCOPY_STACK_TO_XRAM(), but this time to						\
	copy the data back out of XRAM and into the stack. */										\
	pxXRAMStack = ( xdata portSTACK_TYPE * ) *( ( xdata portSTACK_TYPE ** ) pxCurrentTCB );		\
	pxRAMStack = ( data portSTACK_TYPE * data ) ( configSTACK_START - 1 );						\
																								\
	/* The first value stored in XRAM was the size of the stack - i.e. the						\
	number of bytes we need to copy back. */													\
	ucStackBytes = pxXRAMStack[ 0 ];															\
																								\
	/* Copy the required number of bytes back into the stack. */								\
	do																							\
	{																							\
		pxXRAMStack++;																			\
		pxRAMStack++;																			\
		*pxRAMStack = *pxXRAMStack;																\
		ucStackBytes--;																			\
	} while( ucStackBytes );																	\
																								\
	/* Restore the stack pointer ready to use the restored stack. */							\
	SP = ( unsigned portCHAR ) pxRAMStack;														\
}
/*-----------------------------------------------------------*/

/*
 * Macro to push the current execution context onto the stack, before the stack 
 * is moved to XRAM. 
 */
#define portSAVE_CONTEXT()																		\
{																								\
	_asm																						\
		/* Push ACC first, as when restoring the context it must be restored					\
		last (it is used to set the IE register). */											\
		push	ACC																				\
		/* Store the IE register then disable interrupts. */									\
		push	IE																				\
		clr		_EA																				\
		push	DPL																				\
		push	DPH																				\
		push	b																				\
		push	ar2																				\
		push	ar3																				\
		push	ar4																				\
		push	ar5																				\
		push	ar6																				\
		push	ar7																				\
		push	ar0																				\
		push	ar1																				\
		push	PSW																				\
	_endasm;																					\
		PSW = 0;																				\
	_asm																						\
		push	_bp																				\
	_endasm;																					\
}
/*-----------------------------------------------------------*/

/*
 * Macro that restores the execution context from the stack.  The execution 
 * context was saved into the stack before the stack was copied into XRAM.
 */
#define portRESTORE_CONTEXT()																	\
{																								\
	_asm																						\
		pop		_bp																				\
		pop		PSW																				\
		pop		ar1																				\
		pop		ar0																				\
		pop		ar7																				\
		pop		ar6																				\
		pop		ar5																				\
		pop		ar4																				\
		pop		ar3																				\
		pop		ar2																				\
		pop		b																				\
		pop		DPH																				\
		pop		DPL																				\
		/* The next byte of the stack is the IE register.  Only the global						\
		enable bit forms part of the task context.  Pop off the IE then set						\
		the global enable bit to match that of the stored IE register. */						\
		pop		ACC																				\
		JB		ACC.7,0098$																		\
		CLR		IE.7																			\
		LJMP	0099$																			\
	0098$:																						\
		SETB	IE.7																			\
	0099$:																						\
		/* Finally pop off the ACC, which was the first register saved. */						\
		pop		ACC																				\
		reti																					\
	_endasm;																					\
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品国产综合久久久久久| 亚洲欧美电影一区二区| 777奇米成人网| 欧美无乱码久久久免费午夜一区| 99国产欧美久久久精品| 成人激情小说网站| av电影天堂一区二区在线观看| 国产成人av电影在线| 国产91丝袜在线18| voyeur盗摄精品| 色综合久久中文综合久久牛| 91在线你懂得| 欧美专区亚洲专区| 6080亚洲精品一区二区| 制服丝袜国产精品| 精品卡一卡二卡三卡四在线| 久久综合资源网| 欧美激情一区二区三区在线| 中文字幕一区二区三区四区| 亚洲精品日韩一| 婷婷综合久久一区二区三区| 日韩电影在线一区二区| 久久99精品久久久久久国产越南| 国内精品第一页| 丁香六月久久综合狠狠色| 99久久婷婷国产综合精品电影| 91成人免费在线视频| 精品视频资源站| 精品国产髙清在线看国产毛片 | 日韩欧美国产综合| 精品国产一区二区三区四区四| 久久精品一区蜜桃臀影院| 国产精品伦理在线| 亚洲图片欧美综合| 激情图区综合网| 99在线精品视频| 欧美高清你懂得| 欧美激情一区二区三区四区| 亚洲精品福利视频网站| 日本欧美久久久久免费播放网| 国产乱码精品一区二区三| 91麻豆福利精品推荐| 7777精品伊人久久久大香线蕉最新版| 精品成人佐山爱一区二区| 国产精品久久久久一区二区三区共| 亚洲精品中文在线| 九九九精品视频| 色综合久久久久综合| 中文字幕综合网| 午夜久久久久久久久久一区二区| 国产一区二区三区四| 色综合久久综合网| 久久综合国产精品| 樱桃视频在线观看一区| 久久99国内精品| 欧美综合亚洲图片综合区| 精品国产sm最大网站免费看| 亚洲欧美日本在线| 国产美女精品人人做人人爽 | 中文字幕欧美区| 日韩精品视频网| 99精品视频一区| 精品国产第一区二区三区观看体验 | 视频一区国产视频| 国产一区二区三区不卡在线观看| 91丝袜美腿高跟国产极品老师 | 亚洲天堂精品在线观看| 蜜臀久久99精品久久久久久9 | 制服丝袜亚洲播放| 亚洲青青青在线视频| 国产一区二区免费在线| 欧美精品乱人伦久久久久久| 亚洲国产成人自拍| 激情综合五月天| 欧美电影在哪看比较好| 亚洲免费视频中文字幕| 国产成人精品网址| 欧美成人一区二区| 日韩精品欧美成人高清一区二区| 99久久精品情趣| 国产欧美一区二区精品性| 麻豆国产精品官网| 欧美精品日日鲁夜夜添| 亚洲免费在线看| 99久久精品免费| 欧美国产日韩亚洲一区| 国产一区 二区| 精品少妇一区二区三区| 亚洲视频1区2区| 成人免费观看视频| 国产亚洲欧美日韩在线一区| 麻豆中文一区二区| 欧美精品tushy高清| 亚洲高清视频中文字幕| 久久精品夜夜夜夜久久| 久久se这里有精品| 91精品国产色综合久久| 日韩精品五月天| 91麻豆精品国产91久久久久久久久| 亚洲午夜av在线| 欧美午夜寂寞影院| 亚洲成av人影院| 欧美群妇大交群中文字幕| 亚洲国产欧美在线| 91福利区一区二区三区| 亚洲一区二区三区小说| 在线免费视频一区二区| 一级做a爱片久久| 欧美日韩高清一区二区三区| 亚洲成人动漫一区| 91精品国产色综合久久| 美女网站色91| 久久综合99re88久久爱| 国产成人免费视频| 中文字幕亚洲不卡| 色94色欧美sute亚洲线路二| 亚洲在线免费播放| 3d成人动漫网站| 精品一区二区三区久久久| 国产精品久久久久久久裸模| 激情综合色综合久久综合| 久久综合九色综合欧美亚洲| 欧美福利视频一区| 日韩成人免费看| 日韩免费观看高清完整版| www.av亚洲| 国产精品美女久久久久aⅴ| www.欧美色图| 亚洲国产精品视频| 精品久久久久久久久久久久久久久久久| 久久国产精品99久久久久久老狼 | 亚洲男人的天堂一区二区| 欧美最新大片在线看| 日韩精品免费专区| 国产亚洲欧美在线| 91搞黄在线观看| 免费在线欧美视频| 国产日韩欧美精品在线| 色综合久久中文综合久久97| 天天色综合天天| 久久精品日韩一区二区三区| 99久久er热在这里只有精品66| 亚洲va中文字幕| 久久免费美女视频| 色香蕉成人二区免费| 蜜桃免费网站一区二区三区| 久久久蜜桃精品| 欧美中文一区二区三区| 国内成人免费视频| 91精品麻豆日日躁夜夜躁| 天涯成人国产亚洲精品一区av| 亚洲精品乱码久久久久久久久 | 美女mm1313爽爽久久久蜜臀| 国产欧美综合色| 欧美日韩在线播放三区四区| 精品一区二区三区蜜桃| 亚洲精品亚洲人成人网| 精品国产三级a在线观看| 97国产精品videossex| 毛片av一区二区| 夜夜爽夜夜爽精品视频| 久久久欧美精品sm网站| 欧美男人的天堂一二区| 成人毛片老司机大片| 日韩电影在线观看一区| 亚洲天堂中文字幕| 欧美精品一区二区三区蜜桃视频| 91蜜桃婷婷狠狠久久综合9色| 麻豆精品久久精品色综合| 亚洲精品国产精华液| 久久久久久9999| 欧美一区二区三区系列电影| 91片在线免费观看| 国产精品一区免费视频| 亚洲成a人片在线不卡一二三区| 中文字幕第一区| 精品国产一区二区在线观看| 欧美日韩在线三区| 综合久久久久综合| 亚洲大片免费看| 日本一二三四高清不卡| 欧美一级爆毛片| 欧美优质美女网站| 成人激情动漫在线观看| 激情小说欧美图片| 日韩激情一区二区| 亚洲国产cao| 一区av在线播放| 亚洲区小说区图片区qvod| 国产精品欧美精品| 国产亚洲欧美中文| 久久亚洲欧美国产精品乐播| 91精品国产黑色紧身裤美女| 精品视频一区二区不卡| 91捆绑美女网站| 91视频在线看| 99精品欧美一区| 99re这里只有精品视频首页| 国产成人鲁色资源国产91色综 | 国产精品沙发午睡系列990531|