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

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

?? portisr.c

?? MCS-51的一個(gè)Free小型操作系統(tǒng),在KeilC中下編譯工作
?? C
字號(hào):
/*
	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.
	***************************************************************************
*/


/*-----------------------------------------------------------
 * Components that can be compiled to either ARM or THUMB mode are
 * contained in port.c  The ISR routines, which can only be compiled
 * to ARM mode, are contained in this file.
 *----------------------------------------------------------*/

/* This file must always be compiled to ARM mode as it contains ISR 
definitions. */
#pragma ARM

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

/* Constants required to handle interrupts. */
#define portTIMER_MATCH_ISR_BIT		( ( unsigned portCHAR ) 0x01 )
#define portCLEAR_VIC_INTERRUPT		( ( unsigned portLONG ) 0 )

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

/* The code generated by the Keil compiler does not maintain separate
stack and frame pointers. The portENTER_CRITICAL macro cannot therefore
use the stack as per other ports.  Instead a variable is used to keep
track of the critical section nesting.  This variable has to be stored
as part of the task context and must be initialised to a non zero value. */

#define portNO_CRITICAL_NESTING		( ( unsigned portLONG ) 0 )
volatile unsigned portLONG ulCriticalNesting = 9999UL;

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

/* ISR to handle manual context switches (from a call to taskYIELD()). */
void vPortYieldProcessor( void );

/* 
 * The scheduler can only be started from ARM mode, hence the inclusion of this
 * function here.
 */
void vPortISRStartFirstTask( void );

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

void vPortISRStartFirstTask( void )
{
	/* Simply start the scheduler.  This is included here as it can only be
	called from ARM mode. */
	portRESTORE_CONTEXT();
}
/*-----------------------------------------------------------*/

/*
 * Interrupt service routine for the SWI interrupt.  The vector table is
 * configured within startup.s.
 *
 * vPortYieldProcessor() is used to manually force a context switch.  The
 * SWI interrupt is generated by a call to taskYIELD() or portYIELD().
 */
void vPortYieldProcessor( void ) __task
{
	/* Within an IRQ ISR the link register has an offset from the true return 
	address, but an SWI ISR does not.  Add the offset manually so the same 
	ISR return code can be used in both cases. */
	__asm{ ADD	LR, LR, #4 };

	/* Perform the context switch. */
	portSAVE_CONTEXT();
	vTaskSwitchContext();
	portRESTORE_CONTEXT();	
}
/*-----------------------------------------------------------*/

/* 
 * The ISR used for the scheduler tick depends on whether the cooperative or
 * the preemptive scheduler is being used.
 */

#if configUSE_PREEMPTION == 0

	/* 
	 * The cooperative scheduler requires a normal IRQ service routine to 
	 * simply increment the system tick. 
	 */
	void vNonPreemptiveTick( void );
	void vNonPreemptiveTick( void ) __irq
	{
		/* Increment the tick count - this may make a delaying task ready
		to run - but a context switch is not performed. */		
		vTaskIncrementTick();

		/* Ready for the next interrupt. */
		T0IR = portTIMER_MATCH_ISR_BIT;
		VICVectAddr = portCLEAR_VIC_INTERRUPT;
	}

#else

	/* 
	 * The preemptive scheduler ISR is defined as "naked" as the full context 
	 * is saved on entry as part of the context switch. 
	 */
	void vPreemptiveTick( void );
	void vPreemptiveTick( void ) __task
	{
		/* Save the context of the current task. */
		portSAVE_CONTEXT();	

		/* Increment the tick count - this may make a delayed task ready to 
		run. */
		vTaskIncrementTick();

		/* Find the highest priority task that is ready to run. */
		vTaskSwitchContext();

		/* Ready for the next interrupt. */
		T0IR = portTIMER_MATCH_ISR_BIT;
		VICVectAddr = portCLEAR_VIC_INTERRUPT;
		
		/* Restore the context of the highest priority task that is ready to 
		run. */
		portRESTORE_CONTEXT();
	}
#endif
/*-----------------------------------------------------------*/

/*
 * The interrupt management utilities can only be called from ARM mode.  When
 * KEIL_THUMB_INTERWORK is defined the utilities are defined as functions here 
 * to ensure a switch to ARM mode.  When KEIL_THUMB_INTERWORK is not defined 
 * then the utilities are defined as macros in portmacro.h - as per other 
 * ports.
 */
#ifdef KEIL_THUMB_INTERWORK

	void vPortDisableInterruptsFromThumb( void ) __task;
	void vPortEnableInterruptsFromThumb( void ) __task;

	void vPortDisableInterruptsFromThumb( void ) __task
	{
		__asm{ STMDB	SP!, {R0}		};	/* Push R0.									*/
		__asm{ MRS		R0, CPSR		};	/* Get CPSR.								*/
		__asm{ ORR		R0, R0, #0xC0	};	/* Disable IRQ, FIQ.						*/
		__asm{ MSR		CPSR_CXSF, R0	};	/* Write back modified value.				*/
		__asm{ LDMIA	SP!, {R0}		};	/* Pop R0.									*/
		__asm{ BX		R14				};	/* Return back to thumb.					*/
	}
			
	void vPortEnableInterruptsFromThumb( void )	__task
	{
		__asm{ STMDB	SP!, {R0}		};	/* Push R0.									*/
		__asm{ MRS		R0, CPSR		};	/* Get CPSR.								*/
		__asm{ BIC		R0, R0, #0xC0	};	/* Enable IRQ, FIQ.							*/
		__asm{ MSR		CPSR_CXSF, R0	};	/* Write back modified value.				*/
		__asm{ LDMIA	SP!, {R0}		};	/* Pop R0. 									*/
		__asm{ BX		R14				};	/* Return back to thumb.					*/
	}

#endif /* KEIL_THUMB_INTERWORK */



/* The code generated by the Keil compiler does not maintain separate
stack and frame pointers. The portENTER_CRITICAL macro cannot therefore
use the stack as per other ports.  Instead a variable is used to keep
track of the critical section nesting.  This necessitates the use of a 
function in place of the macro. */

void vPortEnterCritical( void )
{
	/* Disable interrupts as per portDISABLE_INTERRUPTS(); 							*/
	__asm{ STMDB	SP!, {R0}		};	/* Push R0.									*/
	__asm{ MRS		R0, CPSR		};	/* Get CPSR.								*/
	__asm{ ORR		R0, R0, #0xC0	};	/* Disable IRQ, FIQ.						*/
	__asm{ MSR		CPSR_CXSF, R0	};	/* Write back modified value.				*/
	__asm{ LDMIA	SP!, {R0}		};	/* Pop R0.									*/

	/* Now interrupts are disabled ulCriticalNesting can be accessed 
	directly.  Increment ulCriticalNesting to keep a count of how many times
	portENTER_CRITICAL() has been called. */
	ulCriticalNesting++;
}

void vPortExitCritical( void )
{
	if( ulCriticalNesting > portNO_CRITICAL_NESTING )
	{
		/* Decrement the nesting count as we are leaving a critical section. */
		ulCriticalNesting--;

		/* If the nesting level has reached zero then interrupts should be
		re-enabled. */
		if( ulCriticalNesting == portNO_CRITICAL_NESTING )
		{
			/* Enable interrupts as per portEXIT_CRITICAL(). */
			__asm{ STMDB	SP!, {R0}		};	/* Push R0.							*/
			__asm{ MRS		R0, CPSR		};	/* Get CPSR.						*/
			__asm{ BIC		R0, R0, #0xC0	};	/* Enable IRQ, FIQ.					*/
			__asm{ MSR		CPSR_CXSF, R0	};	/* Write back modified value.		*/
			__asm{ LDMIA	SP!, {R0}		};	/* Pop R0. 							*/
		}
	}
}










?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色图激情小说| 欧美精品一区二| 国产综合一区二区| 亚洲精品美国一| 精品福利一区二区三区免费视频| 91麻豆swag| 国产黄色91视频| 蜜臀va亚洲va欧美va天堂| 一区av在线播放| 日本一区二区三区在线观看| 日韩一区二区三区电影在线观看| 色综合久久天天| 国产成人亚洲综合色影视| 蜜臀91精品一区二区三区| 一区二区三区四区蜜桃| 国产精品久久久久毛片软件| 2021国产精品久久精品| 欧美一级理论片| 在线观看亚洲成人| 91老司机福利 在线| 成人性色生活片免费看爆迷你毛片| 日韩成人免费电影| 午夜在线成人av| 一区二区三区在线视频免费观看| 欧美国产亚洲另类动漫| 26uuu欧美日本| 欧美久久一区二区| 91黄色免费看| 一本到一区二区三区| 成人看片黄a免费看在线| 久久电影国产免费久久电影| 日韩黄色小视频| 亚洲成人自拍网| 亚洲成人激情综合网| 美洲天堂一区二卡三卡四卡视频| 亚洲人精品午夜| 综合激情网...| 亚洲人成在线观看一区二区| 亚洲免费观看高清完整版在线观看 | 色婷婷综合久色| 成人国产在线观看| 成人午夜又粗又硬又大| 国产在线精品国自产拍免费| 韩国av一区二区三区| 国产在线不卡一区| 国产精品资源在线观看| 久草这里只有精品视频| 国产一区二区三区免费看 | 亚洲乱码国产乱码精品精的特点| 国产精品久久久久久妇女6080| 国产视频一区二区三区在线观看| 精品久久久久久久一区二区蜜臀| 欧美tk—视频vk| 久久久99精品久久| 国产精品久久久久久久久免费相片 | 欧美一区二区大片| 日韩精品一区二区三区四区| 欧美电影免费观看高清完整版 | 欧美激情资源网| 亚洲色图一区二区三区| 一区二区三区免费网站| 日韩vs国产vs欧美| 国产在线视频一区二区三区| 国产69精品久久久久毛片| 成人免费观看视频| 欧洲精品中文字幕| 欧美一级一级性生活免费录像| 精品福利在线导航| 中文字幕一区av| 午夜精品免费在线| 国产乱码一区二区三区| 99久久精品免费看国产免费软件| 欧美日韩午夜在线视频| 精品日韩99亚洲| 亚洲日本中文字幕区| 亚洲成人av免费| 国产一区999| 欧美天天综合网| 久久亚洲精精品中文字幕早川悠里| 国产精品久久久一本精品 | 久久综合五月天婷婷伊人| 国产精品素人视频| 日韩国产一二三区| 成人免费视频app| 欧美精品一二三| 国产精品五月天| 日韩精品1区2区3区| 不卡高清视频专区| 欧美一区二区三区色| 欧美国产97人人爽人人喊| 亚洲伊人色欲综合网| 国产剧情av麻豆香蕉精品| 欧美午夜影院一区| 国产亚洲欧美日韩俺去了| 午夜精品一区二区三区电影天堂 | 在线免费观看日本欧美| 337p日本欧洲亚洲大胆精品| 亚洲九九爱视频| 国产资源在线一区| 欧美三级电影在线看| 欧美国产亚洲另类动漫| 欧美a一区二区| 色综合久久天天综合网| 久久久久亚洲蜜桃| 日韩高清不卡在线| 色狠狠桃花综合| 久久精品人人做人人爽人人| 秋霞午夜鲁丝一区二区老狼| 91亚洲精品久久久蜜桃| 一区二区三区美女| 国产成人免费视频网站高清观看视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产亚洲一区二区三区四区| 日韩av电影天堂| 在线免费观看一区| 国产精品久久久久久久蜜臀| 国产一区二区三区在线观看免费 | 久久精品一区蜜桃臀影院| 丝袜a∨在线一区二区三区不卡| av在线播放成人| 国产精品嫩草影院av蜜臀| 国产精品香蕉一区二区三区| 精品三级av在线| 激情成人午夜视频| 日韩一区二区三区视频在线观看| 图片区日韩欧美亚洲| 欧美色电影在线| 一区二区三区中文字幕精品精品 | 精品国产91乱码一区二区三区| 视频一区免费在线观看| 欧美三区免费完整视频在线观看| 亚洲丝袜美腿综合| 色综合一区二区三区| 日韩一区在线免费观看| 成人ar影院免费观看视频| 国产精品久久久久国产精品日日 | 欧美性猛片aaaaaaa做受| 亚洲精品免费一二三区| 色猫猫国产区一区二在线视频| 亚洲色图清纯唯美| 在线影视一区二区三区| 亚洲午夜久久久久中文字幕久| 色激情天天射综合网| 亚洲成人高清在线| 欧美精品少妇一区二区三区| 日韩av二区在线播放| 精品国产乱码久久久久久影片| 九一九一国产精品| 欧美成人一区二区三区在线观看| 九色|91porny| 日本一区二区三区国色天香 | 狠狠色丁香婷婷综合久久片| 日韩美女天天操| 国产精品88888| 国产精品成人免费| 久久影院午夜论| 国产成人在线观看免费网站| 国产精品麻豆视频| 91麻豆免费看| 天天影视网天天综合色在线播放| 欧美一区二区免费| 懂色av一区二区三区免费看| 国产精品视频你懂的| 在线观看成人免费视频| 日韩经典一区二区| 久久精品人人做人人综合| 91视频xxxx| 日本在线播放一区二区三区| 久久嫩草精品久久久久| 91美女福利视频| 日韩国产高清影视| 国产三级精品三级| 欧美三级电影精品| 韩国精品主播一区二区在线观看 | 国产成人精品免费一区二区| 亚洲男人天堂av| 精品成人在线观看| 色婷婷综合五月| 狠狠狠色丁香婷婷综合激情| 亚洲男同1069视频| ww亚洲ww在线观看国产| 在线观看日韩av先锋影音电影院| 久久精品国产成人一区二区三区| 中文字幕亚洲精品在线观看| 欧美理论电影在线| 粉嫩久久99精品久久久久久夜| 香蕉加勒比综合久久| 国产精品久久久久aaaa樱花| 日韩一区二区三| 91免费版pro下载短视频| 久草热8精品视频在线观看| 一区二区三区四区在线免费观看| 精品久久人人做人人爽| 欧美性色综合网| www.成人网.com| 久久精品国产99国产精品| 樱花草国产18久久久久| 国产视频一区二区在线观看| 9191成人精品久久| 91国产福利在线|