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

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

?? portisr.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? C
字號:
/*
	FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 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.

	Also see http://www.SafeRTOS.com for an IEC 61508 compliant version along
	with commercial development and support options.
	***************************************************************************
*/


/*-----------------------------------------------------------
 * 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.
 *----------------------------------------------------------*/

/*
	Changes from V3.2.4

	+ The assembler statements are now included in a single asm block rather
	  than each line having its own asm block.
*/


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

/* Constants required to handle interrupts. */
#define portCLEAR_AIC_INTERRUPT		( ( unsigned portLONG ) 0 )

/* Constants required to handle critical sections. */
#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 ) __attribute__((interrupt("SWI"), naked));

/* 
 * 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();
}
/*-----------------------------------------------------------*/

/*
 * Called by portYIELD() or taskYIELD() to manually force a context switch.
 *
 * When a context switch is performed from the task level the saved task 
 * context is made to look as if it occurred from within the tick ISR.  This
 * way the same restore context function can be used when restoring the context
 * saved from the ISR or that saved from a call to vPortYieldProcessor.
 */
void vPortYieldProcessor( void )
{
	/* 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 volatile ( "ADD		LR, LR, #4" );

	/* Perform the context switch.  First save the context of the current task. */
	portSAVE_CONTEXT();

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

	/* Restore the context of the new task. */
	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 ) __attribute__ ((interrupt ("IRQ")));
	void vNonPreemptiveTick( void )
	{		
	static volatile unsigned portLONG ulDummy;

		/* Clear tick timer interrupt indication. */
		ulDummy = portTIMER_REG_BASE_PTR->TC_SR;  

		vTaskIncrementTick();

		/* Acknowledge the interrupt at AIC level... */
		AT91C_BASE_AIC->AIC_EOICR = portCLEAR_AIC_INTERRUPT;
	}

#else  /* else preemption is turned on */

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

		/* WARNING - Do not use local (stack) variables here.  Use globals
					 if you must! */
		static volatile unsigned portLONG ulDummy;

		/* Clear tick timer interrupt indication. */
		ulDummy = portTIMER_REG_BASE_PTR->TC_SR;  

		/* Increment the RTOS tick count, then look for the highest priority 
		task that is ready to run. */
		vTaskIncrementTick();
		vTaskSwitchContext();

		/* Acknowledge the interrupt at AIC level... */
		AT91C_BASE_AIC->AIC_EOICR = portCLEAR_AIC_INTERRUPT;

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

#endif
/*-----------------------------------------------------------*/

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

	void vPortDisableInterruptsFromThumb( void ) __attribute__ ((naked));
	void vPortEnableInterruptsFromThumb( void ) __attribute__ ((naked));

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

#endif /* THUMB_INTERWORK */

/* The code generated by the GCC compiler uses the stack in different ways at
different optimisation levels.  The interrupt flags can therefore not always
be saved to the stack.  Instead the critical section nesting level is stored
in a variable, which is then saved as part of the stack context. */
void vPortEnterCritical( void )
{
	/* Disable interrupts as per portDISABLE_INTERRUPTS(); 							*/
	asm volatile ( 
		"STMDB	SP!, {R0}			\n\t"	/* Push R0.								*/
		"MRS	R0, CPSR			\n\t"	/* Get CPSR.							*/
		"ORR	R0, R0, #0xC0		\n\t"	/* Disable IRQ, FIQ.					*/
		"MSR	CPSR, R0			\n\t"	/* Write back modified value.			*/
		"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 volatile ( 
				"STMDB	SP!, {R0}		\n\t"	/* Push R0.						*/	
				"MRS	R0, CPSR		\n\t"	/* Get CPSR.					*/	
				"BIC	R0, R0, #0xC0	\n\t"	/* Enable IRQ, FIQ.				*/	
				"MSR	CPSR, R0		\n\t"	/* Write back modified value.	*/	
				"LDMIA	SP!, {R0}" );			/* Pop R0.						*/
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
1024成人网| 国产精品网曝门| 91视频在线观看免费| 精品伊人久久久久7777人| 亚洲国产成人av| 一区二区三区毛片| 一区二区三区免费观看| 亚洲人成网站在线| 亚洲另类春色国产| 亚洲一级电影视频| 亚洲第一在线综合网站| 亚洲无线码一区二区三区| 午夜一区二区三区视频| 午夜欧美在线一二页| k8久久久一区二区三区| 成人免费视频播放| 亚洲国产一区二区三区 | 7777精品伊人久久久大香线蕉最新版| 欧美不卡视频一区| 一区二区久久久久| 成人不卡免费av| 久久久久成人黄色影片| 免费日本视频一区| 欧美日韩精品免费观看视频| 亚洲色图视频网| 成a人片亚洲日本久久| 国产日韩欧美a| 国产精品主播直播| 精品国产乱码久久久久久免费 | 国产精品欧美一区二区三区| 美国十次了思思久久精品导航| 色婷婷综合激情| 亚洲欧美国产77777| 99久久99久久精品国产片果冻| 国产亚洲女人久久久久毛片| 激情五月婷婷综合| 欧美sm极限捆绑bd| 精品一区二区在线播放| 2021中文字幕一区亚洲| 精品一区二区三区免费视频| 精品久久久久久亚洲综合网| 精品在线你懂的| 久久久国产精品午夜一区ai换脸| 国产一区二区三区蝌蚪| 久久无码av三级| 高清在线不卡av| 中文字幕一区在线观看| 97精品超碰一区二区三区| 亚洲免费毛片网站| 欧洲中文字幕精品| 日韩1区2区日韩1区2区| 日韩一级精品视频在线观看| 久草精品在线观看| 国产日韩综合av| 色综合天天狠狠| 亚洲va韩国va欧美va精品 | 五月天久久比比资源色| 日韩一级二级三级精品视频| 国产精品99精品久久免费| 国产精品久久久久国产精品日日| 91在线高清观看| 午夜久久久久久电影| 日韩欧美精品三级| 成人av电影在线网| 亚洲一区二区三区视频在线播放| 欧美精品第1页| 国产 日韩 欧美大片| 一区二区三区四区av| 欧美变态凌虐bdsm| 波多野结衣亚洲一区| 亚洲.国产.中文慕字在线| 亚洲精品在线电影| 91在线观看污| 精品一区二区免费看| 亚洲视频中文字幕| 欧美一级二级三级蜜桃| 99久久精品国产网站| 日本视频免费一区| 亚洲欧美色一区| 日韩欧美久久久| 日本韩国欧美在线| 国产一区不卡精品| 丝袜诱惑制服诱惑色一区在线观看 | 国产清纯在线一区二区www| 色哟哟在线观看一区二区三区| 久久国产综合精品| 亚洲精品乱码久久久久久久久| 2021国产精品久久精品| 欧美日韩国产另类不卡| 成人污视频在线观看| 五月婷婷久久综合| 亚洲三级电影网站| 久久亚洲精品小早川怜子| 欧美日韩第一区日日骚| 99麻豆久久久国产精品免费优播| 麻豆91精品91久久久的内涵| 亚洲一区在线电影| 中文av一区二区| 精品精品国产高清a毛片牛牛 | 欧美日韩国产精品成人| 北条麻妃一区二区三区| 久久国产免费看| 蜜臀av一区二区在线免费观看| 一区二区三区国产精华| 国产精品久久久久久妇女6080| 精品国产乱码久久久久久老虎| 欧美精选午夜久久久乱码6080| 色综合天天综合网国产成人综合天| 国产白丝网站精品污在线入口| 日本色综合中文字幕| 丝袜诱惑亚洲看片| 性欧美疯狂xxxxbbbb| 一区二区三区在线看| 亚洲乱码日产精品bd| 亚洲免费av网站| 亚洲美女一区二区三区| 亚洲美女视频在线| 一区二区三区丝袜| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲日本电影在线| 亚洲男人天堂av| 亚洲国产综合色| 国内精品不卡在线| 韩日欧美一区二区三区| 狠狠色丁香九九婷婷综合五月| 激情久久五月天| 国产精品香蕉一区二区三区| 国产综合成人久久大片91| 国产一区二区三区精品欧美日韩一区二区三区 | 久久久影院官网| 久久久久久久久久看片| 欧美国产成人精品| 中文字幕一区二区不卡| 一区二区三区在线视频观看58| 夜夜爽夜夜爽精品视频| 无吗不卡中文字幕| 毛片不卡一区二区| 国产麻豆欧美日韩一区| 成人短视频下载| 欧美在线影院一区二区| 666欧美在线视频| 日韩视频免费直播| 欧美极品aⅴ影院| 伊人婷婷欧美激情| 日本午夜精品视频在线观看| 激情偷乱视频一区二区三区| 99re亚洲国产精品| 欧美日韩国产在线播放网站| 欧美大片一区二区| 国产精品久久免费看| 亚洲va在线va天堂| 国产成人亚洲综合a∨婷婷 | 国产一区二区三区电影在线观看| 国产91丝袜在线18| 欧美天天综合网| 26uuu亚洲| 亚洲免费在线观看| 美国十次综合导航| 99久精品国产| 日韩欧美中文字幕制服| 中文字幕av一区二区三区| 亚洲www啪成人一区二区麻豆| 国产精品99久久久久久似苏梦涵 | 国产成人av一区二区三区在线观看| 99这里只有久久精品视频| 3d动漫精品啪啪| 自拍偷在线精品自拍偷无码专区| 轻轻草成人在线| 色88888久久久久久影院野外| 久久女同性恋中文字幕| 亚洲自拍都市欧美小说| 国产黄色成人av| 91精品国产色综合久久不卡蜜臀 | 粉嫩aⅴ一区二区三区四区| 欧美日韩精品专区| 国产精品不卡一区| 国产一区二区三区免费看| 欧美精品自拍偷拍动漫精品| 国产精品免费看片| 国产一区高清在线| 91精品国产91热久久久做人人 | 日本精品一级二级| 久久久电影一区二区三区| 奇米在线7777在线精品| 欧美偷拍一区二区| 亚洲激情中文1区| 99综合电影在线视频| 久久久久久久性| 蜜乳av一区二区| 91精品国产品国语在线不卡| 亚洲国产精品自拍| 91美女福利视频| 国产精品久久久久久亚洲伦| 国产精品123| 国产欧美日韩精品一区| 国产伦精品一区二区三区免费迷| 欧美一区二区三区不卡| 日韩国产成人精品| 欧美一区二区三区免费在线看| 天天影视涩香欲综合网|