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

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

?? portisr.c

?? FreeRTOSV4.1.0 安裝文件 FreeRTOS 是一個源碼公開的免費的嵌入式實時操作系統
?? C
字號:
/*
	FreeRTOS.org V4.1.0 - 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.
 *----------------------------------------------------------*/

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

#include "AT91SAM7X256.h"

/* Constants required to handle interrupts. */
#define portTIMER_MATCH_ISR_BIT		( ( unsigned portCHAR ) 0x01 )
#define portCLEAR_VIC_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 )
	{		
		unsigned portLONG ulDummy;
		
		/* Increment the tick count - which may wake some tasks but as the
		preemptive scheduler is not being used any woken task is not given
		processor time no matter what its priority. */
		vTaskIncrementTick();
		
		/* Clear the PIT interrupt. */
		ulDummy = AT91C_BASE_PITC->PITC_PIVR;
		
		/* End the interrupt in the AIC. */
		AT91C_BASE_AIC->AIC_EOICR = ulDummy;
	}

#else

	/* 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 current task. */
		portSAVE_CONTEXT();			

		/* Increment the tick count - this may wake a task. */
		vTaskIncrementTick();

		/* Find the highest priority task that is ready to run. */
		vTaskSwitchContext();
		
		/* End the interrupt in the AIC. */
		AT91C_BASE_AIC->AIC_EOICR = AT91C_BASE_PITC->PITC_PIVR;;
		
		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.
 */
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.					*/
}


/* 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一区二区三区免费野_久草精品视频
亚洲电影在线播放| 国产成人精品免费| 成人免费的视频| 欧美日韩精品三区| 欧美国产日韩在线观看| 免费在线一区观看| 欧美亚洲国产bt| 中文字幕av在线一区二区三区| 美腿丝袜在线亚洲一区| 91久久久免费一区二区| 国产精品丝袜在线| 国产精品一区一区| 久久久久国产一区二区三区四区| 天天色图综合网| 日韩欧美一卡二卡| 亚洲一区在线观看视频| 一本久久a久久精品亚洲| 国产欧美视频一区二区三区| 麻豆91精品视频| 欧美伦理电影网| 亚洲国产成人av网| 欧美性大战久久| 一区二区三区四区不卡视频| 91久久精品一区二区三| 中文字幕一区二区在线观看| 99精品国产99久久久久久白柏| 欧美国产日韩亚洲一区| 国产成人精品免费在线| 国产欧美一区二区精品忘忧草| 国产成人精品aa毛片| 国产欧美日韩视频一区二区| 国产麻豆精品95视频| 久久九九久久九九| 国产成人精品午夜视频免费| 中文字幕在线免费不卡| 日本精品一级二级| 亚洲午夜在线电影| 这里是久久伊人| 久久99精品国产麻豆婷婷洗澡| 欧美不卡视频一区| 国产美女在线观看一区| 国产蜜臀av在线一区二区三区| 成人午夜伦理影院| 亚洲精品国久久99热| 欧美亚日韩国产aⅴ精品中极品| 日韩精品电影在线观看| 26uuu精品一区二区三区四区在线| 国产一区日韩二区欧美三区| 国产精品盗摄一区二区三区| 欧洲av一区二区嗯嗯嗯啊| 日韩国产精品久久久| 久久在线观看免费| eeuss鲁片一区二区三区在线观看| 亚洲日本一区二区| 欧美一区二区三区四区久久| 国产成人在线电影| 亚洲综合一区在线| 欧美精品一区二区三区在线 | 欧美精品自拍偷拍动漫精品| 久久99久久久欧美国产| 国产精品免费久久久久| 欧美在线小视频| 国产一区二区伦理| 亚洲色图第一区| 日韩无一区二区| 99综合影院在线| 麻豆久久久久久久| 亚洲欧美国产高清| 久久综合视频网| 欧洲色大大久久| 国产成人综合在线观看| 午夜日韩在线电影| 中文字幕第一区| 欧美一区二区久久久| 白白色 亚洲乱淫| 奇米精品一区二区三区四区| 亚洲国产色一区| 久久午夜电影网| 欧美日韩国产另类不卡| 成人免费av资源| 黑人巨大精品欧美黑白配亚洲| 亚洲欧美日韩国产一区二区三区| 精品国产91久久久久久久妲己 | 日韩欧美www| 色婷婷精品久久二区二区蜜臂av | 欧美精品一区二区三区四区| 色8久久精品久久久久久蜜 | 国产精品国产自产拍高清av | 国产福利一区二区三区在线视频| 亚洲国产一区二区三区青草影视| 亚洲欧洲av在线| 国产色婷婷亚洲99精品小说| 91精品国产乱| 欧美性生活大片视频| 成人免费福利片| 国产1区2区3区精品美女| 久热成人在线视频| 青青草一区二区三区| 亚洲成人av福利| 亚洲免费在线看| 亚洲精品大片www| 亚洲视频在线一区| 1区2区3区精品视频| 国产精品免费视频网站| 中文在线一区二区| 欧美激情综合在线| 欧美国产在线观看| 国产精品久久久久一区| 国产精品视频线看| 国产精品人人做人人爽人人添| 久久久久久99久久久精品网站| 精品国产伦一区二区三区观看方式 | 国产一区二区电影| 国产精品自在在线| 风间由美性色一区二区三区| 国产精品夜夜爽| 成人一区二区三区在线观看| 国产成人午夜片在线观看高清观看| 国产尤物一区二区| 成人白浆超碰人人人人| 91视频观看免费| 欧美三级日韩三级| 717成人午夜免费福利电影| 宅男在线国产精品| 2017欧美狠狠色| 国产精品毛片久久久久久| 中文字幕一区二区日韩精品绯色| 亚洲精品国产第一综合99久久| 怡红院av一区二区三区| 视频一区欧美精品| 久久精品av麻豆的观看方式| 国产成人综合在线播放| 91麻豆国产精品久久| 欧美日韩在线不卡| 精品奇米国产一区二区三区| 欧美国产97人人爽人人喊| 亚洲综合av网| 九一久久久久久| 成人在线综合网| 欧美日韩久久久久久| 中文子幕无线码一区tr| 亚洲va天堂va国产va久| 久久国产三级精品| av亚洲精华国产精华| 欧美群妇大交群的观看方式| 久久综合九色综合97婷婷| 亚洲色图一区二区三区| 美脚の诱脚舐め脚责91 | 欧美日本视频在线| 欧美一卡二卡在线观看| 国产精品久久久久久亚洲伦 | 亚洲成av人片在线观看无码| 精品一区二区成人精品| 91亚洲午夜精品久久久久久| 日韩三级av在线播放| 国产精品视频一二三| 伦理电影国产精品| 在线观看日韩高清av| 精品99久久久久久| 亚洲国产精品久久人人爱蜜臀 | 欧美亚洲一区二区在线| 久久综合丝袜日本网| 亚洲国产欧美在线人成| 成人免费毛片嘿嘿连载视频| 日韩视频免费观看高清在线视频| 国产精品高清亚洲| 久久国产精品无码网站| 欧美日韩在线综合| 亚洲视频网在线直播| 国产999精品久久久久久| 日韩视频在线永久播放| 亚洲在线成人精品| 99精品久久免费看蜜臀剧情介绍| 日韩精品中文字幕在线一区| 亚洲综合av网| 99久精品国产| 中文字幕制服丝袜一区二区三区| 精品在线你懂的| 91精品国产入口在线| 亚洲福利电影网| 日本伦理一区二区| 亚洲视频免费看| 99热99精品| 中文字幕视频一区| eeuss影院一区二区三区 | 成人免费毛片高清视频| 久久久久久麻豆| 精品午夜久久福利影院| 日韩欧美激情一区| 免费观看在线综合色| 91精品国产丝袜白色高跟鞋| 亚洲第一综合色| 欧美日韩高清一区| 午夜av区久久| 91精品国产综合久久精品性色| 亚洲高清三级视频| 3d成人动漫网站| 蜜臀av性久久久久蜜臀aⅴ | 亚洲天堂精品视频| 丁香桃色午夜亚洲一区二区三区|