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

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

?? portisr.c

?? FreeRtos Source code Version 4.04
?? C
字號:
/*
	FreeRTOS.org V4.0.4 - 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一区二区三区免费野_久草精品视频
激情图片小说一区| 99久久777色| 欧美v日韩v国产v| 激情综合色播激情啊| 日韩欧美一二三四区| 亚洲国产日韩一级| 欧美不卡123| www.视频一区| 日韩精品五月天| 久久久久久夜精品精品免费| 国产成人免费xxxxxxxx| 亚洲免费资源在线播放| 日韩欧美色综合| 91一区在线观看| 国产精品自拍毛片| 亚洲成人精品一区| 中文字幕一区二区三区四区| 欧美日韩情趣电影| 一本大道久久a久久综合| 麻豆久久一区二区| 亚洲一二三四在线观看| 国产婷婷精品av在线| 欧美精品123区| 在线观看国产一区二区| 成人激情免费电影网址| 国产乱淫av一区二区三区| 青青草国产精品亚洲专区无| 亚洲人精品午夜| 中文字幕在线不卡国产视频| 欧美成人国产一区二区| 欧美日韩精品电影| 欧美专区亚洲专区| 国产精品一区专区| 国产精品一区专区| 国产99久久久久| 成人激情小说乱人伦| 国产精品99久久久久久宅男| 国内久久婷婷综合| 久久精品国产网站| 国产成人午夜精品影院观看视频| 免费成人性网站| 国产精品69久久久久水密桃| 国产91丝袜在线观看| 色婷婷亚洲综合| 欧美美女视频在线观看| 精品国产乱码久久久久久蜜臀 | 中文字幕在线不卡国产视频| 欧美国产一区二区在线观看| 国产精品视频免费| 亚洲人成网站在线| 紧缚捆绑精品一区二区| av激情综合网| 欧美肥大bbwbbw高潮| 中文文精品字幕一区二区| 亚洲乱码精品一二三四区日韩在线| 一区二区三区在线看| 美女一区二区三区在线观看| av激情亚洲男人天堂| 欧美一级专区免费大片| 国产精品国产精品国产专区不片| 亚洲欧美自拍偷拍| 精品日韩在线一区| 亚洲视频资源在线| 国产在线精品国自产拍免费| 色网综合在线观看| 欧美成人艳星乳罩| 日韩不卡在线观看日韩不卡视频| 丰满放荡岳乱妇91ww| 欧美tickling网站挠脚心| 午夜一区二区三区视频| 色综合咪咪久久| 亚洲日本一区二区| 丰满少妇在线播放bd日韩电影| 精品1区2区在线观看| 奇米在线7777在线精品| 日韩小视频在线观看专区| 日日摸夜夜添夜夜添精品视频| 欧美四级电影在线观看| 亚洲sss视频在线视频| 欧美日韩不卡在线| 久久99精品国产.久久久久| 日韩欧美三级在线| 国产成人精品亚洲日本在线桃色| 日韩午夜三级在线| 风间由美中文字幕在线看视频国产欧美| 日韩免费观看2025年上映的电影| 精品午夜久久福利影院| 国产亚洲精品资源在线26u| 大尺度一区二区| 亚洲影视在线播放| 日韩欧美国产一二三区| www.日韩大片| 麻豆视频观看网址久久| 毛片av一区二区| 日韩免费视频一区二区| 六月丁香婷婷色狠狠久久| 天堂久久一区二区三区| 欧美性大战久久| 日韩一区日韩二区| 成人激情黄色小说| 国产999精品久久久久久| 精品成人在线观看| 岛国精品在线观看| 日本在线不卡一区| 亚洲欧洲精品一区二区精品久久久| 色诱亚洲精品久久久久久| 日本成人在线一区| 亚洲成人福利片| 亚洲美女淫视频| 中文字幕第一区综合| 日韩一区二区三区高清免费看看| 91在线看国产| 不卡区在线中文字幕| 亚洲图片欧美综合| 日韩欧美黄色影院| 91精品国产综合久久久蜜臀粉嫩 | 欧美videos中文字幕| 欧美高清视频一二三区| 欧美午夜精品一区| 欧美优质美女网站| 欧美日韩国产欧美日美国产精品| 91久久线看在观草草青青| 91小宝寻花一区二区三区| 93久久精品日日躁夜夜躁欧美| av男人天堂一区| 在线观看一区二区视频| 欧美中文字幕一区二区三区亚洲 | 卡一卡二国产精品| 国产精品自拍一区| 日本久久一区二区| 日韩精品一区二区三区三区免费| 久久久噜噜噜久久人人看| 18欧美乱大交hd1984| 日韩精品国产精品| 成人污污视频在线观看| 欧美三级中文字幕| 久久精品视频在线免费观看| 一区二区中文字幕在线| 免费在线一区观看| 91成人看片片| 久久嫩草精品久久久精品一| 亚洲永久免费视频| yourporn久久国产精品| ww亚洲ww在线观看国产| 亚洲视频免费看| 国产成人精品三级麻豆| 91精品国产入口| 亚洲国产精品麻豆| 97国产一区二区| 国产精品人成在线观看免费| 免费成人你懂的| 欧美日韩亚洲另类| 亚洲第一狼人社区| 欧美日韩一区在线观看| 一区二区三区美女视频| 91在线你懂得| 欧美极品aⅴ影院| 另类小说一区二区三区| 91麻豆精品国产自产在线观看一区| 一区二区三区精密机械公司| 国产成人精品免费一区二区| 久久久久久综合| 国产成人在线电影| 亚洲日穴在线视频| 欧美最猛黑人xxxxx猛交| 亚洲成年人影院| 日韩欧美综合一区| 国产高清亚洲一区| 专区另类欧美日韩| 51久久夜色精品国产麻豆| 精彩视频一区二区| 中文字幕制服丝袜成人av| 在线精品视频一区二区| 久久成人免费电影| 成人欧美一区二区三区黑人麻豆| 99久久久国产精品| 蜜臀99久久精品久久久久久软件| 国产亚洲1区2区3区| 91丝袜美女网| 成人中文字幕在线| 亚洲电影视频在线| ...中文天堂在线一区| 日韩欧美精品在线| 欧美日韩在线综合| 成人午夜激情视频| 韩日欧美一区二区三区| 亚洲美女偷拍久久| 久久久五月婷婷| 精品久久人人做人人爰| 欧美日韩一区二区不卡| 91传媒视频在线播放| 成人aa视频在线观看| 国产伦精品一区二区三区在线观看| 亚洲一区二区三区四区在线免费观看 | 欧美日韩色一区| 在线免费观看日韩欧美| 91看片淫黄大片一级在线观看| 久久99日本精品| 国产精品一区二区免费不卡 | 91精品国产黑色紧身裤美女|