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

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

?? portisr.c

?? FreeRtos Source code Version 4.04
?? C
字號(hào):
/*
	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 V2.5.2
		
	+ The critical section management functions have been changed.  These no
	  longer modify the stack and are safe to use at all optimisation levels.
	  The functions are now also the same for both ARM and THUMB modes.

	Changes from V2.6.0

	+ Removed the 'static' from the definition of vNonPreemptiveTick() to 
	  allow the demo to link when using the cooperative scheduler.

	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 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 )
	{		
		vTaskIncrementTick();
		T0_IR = portTIMER_MATCH_ISR_BIT;
		VICVectAddr = portCLEAR_VIC_INTERRUPT;
	}

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

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

		/* Ready for the next interrupt. */
		T0_IR = portTIMER_MATCH_ISR_BIT;
		VICVectAddr = portCLEAR_VIC_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.						*/
		}
	}
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美电影院| 亚洲在线观看免费视频| 色嗨嗨av一区二区三区| 免费视频最近日韩| 中文字幕一区av| 日韩一区二区在线观看视频播放| 国产suv一区二区三区88区| 亚洲成人免费视频| 国产精品伦理一区二区| 欧美精品xxxxbbbb| 91视视频在线观看入口直接观看www| 天天操天天综合网| 亚洲欧美日韩国产综合在线| 久久综合九色欧美综合狠狠| 欧美丝袜自拍制服另类| 成人三级在线视频| 国产资源精品在线观看| 亚洲第一会所有码转帖| 中文字幕在线播放不卡一区| 日韩免费一区二区三区在线播放| 欧洲精品视频在线观看| 成人av片在线观看| 国产激情精品久久久第一区二区| 丝袜国产日韩另类美女| 亚洲综合另类小说| 亚洲男人天堂av| 国产精品剧情在线亚洲| 国产成人免费视频精品含羞草妖精| 国产精品久久精品日日| 欧美日韩国产另类一区| 一区二区欧美国产| 国产精品久久毛片| 久久精品一区蜜桃臀影院| 精品国产一区久久| 日韩欧美一区中文| 日韩西西人体444www| 欧美高清激情brazzers| 欧美视频精品在线观看| 欧美久久久一区| av网站免费线看精品| 亚洲视频综合在线| 国产精品国产三级国产| 久久在线观看免费| 欧美一级久久久| 欧美另类久久久品| 91黄色在线观看| 91影院在线免费观看| 国产 日韩 欧美大片| 日本vs亚洲vs韩国一区三区二区| 亚洲成a人v欧美综合天堂下载| 亚洲日本在线天堂| 亚洲欧洲精品一区二区精品久久久| 久久久亚洲高清| 精品动漫一区二区三区在线观看| 欧美大片拔萝卜| 日韩西西人体444www| 日韩欧美资源站| 日韩一区二区高清| 精品毛片乱码1区2区3区| 91精品国产欧美一区二区| 欧美精选一区二区| 欧美妇女性影城| 99久久国产免费看| 欧美日韩美少妇 | 麻豆91在线看| 日韩av电影免费观看高清完整版| 午夜精品久久久久久| 午夜激情一区二区| 日韩av中文字幕一区二区| 日本欧美肥老太交大片| 蜜桃视频在线观看一区| 久久99久久久欧美国产| 国产精品综合二区| 成人精品在线视频观看| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 蜜臀av一区二区三区| 九色综合狠狠综合久久| 国产一区二区精品久久99 | 色婷婷亚洲综合| 欧洲国产伦久久久久久久| 欧美男女性生活在线直播观看| 69成人精品免费视频| 日韩欧美中文一区| 欧美国产激情二区三区| 成人免费在线播放视频| 亚洲成人高清在线| 精品一区二区在线观看| 成人高清伦理免费影院在线观看| 国产69精品久久久久777| 精品一区二区在线视频| 国产suv精品一区二区6| 日本道免费精品一区二区三区| 91精品久久久久久久91蜜桃| xnxx国产精品| 一区二区三区在线不卡| 艳妇臀荡乳欲伦亚洲一区| 久久国产精品一区二区| 成人黄色在线看| 欧美老人xxxx18| 久久精品视频免费观看| 亚洲网友自拍偷拍| 国产又粗又猛又爽又黄91精品| 不卡一区二区三区四区| 欧美一区二区三区日韩视频| 日本一区免费视频| 亚洲超碰精品一区二区| 国产资源在线一区| 欧美性极品少妇| 久久久久久综合| 天涯成人国产亚洲精品一区av| 国产精品白丝jk黑袜喷水| 欧美三电影在线| 中文字幕av一区二区三区免费看| 午夜精品免费在线| 不卡免费追剧大全电视剧网站| 欧美久久久久久蜜桃| 一区二区三区美女| 国产传媒久久文化传媒| 欧美人xxxx| 亚洲欧美日韩在线| 国产精品1024久久| 日韩欧美国产一区二区在线播放| 亚洲人吸女人奶水| 国产成人综合网| 日韩欧美一区电影| 午夜精品久久久久久久久久久| 国产高清精品网站| 日韩美女视频在线| 无码av中文一区二区三区桃花岛| 成人激情电影免费在线观看| 日韩一区二区三免费高清| 亚洲黄色在线视频| 成人午夜电影久久影院| 精品国产三级a在线观看| 亚洲福利视频导航| 欧美日韩一级视频| 亚洲精品国产视频| 99久久婷婷国产综合精品电影 | 91精品国产综合久久香蕉的特点| 亚洲日本乱码在线观看| 成人动漫中文字幕| 久久久久国产精品厨房| 精品一区二区三区免费视频| 欧美一区三区四区| 精品午夜久久福利影院| 日韩女优电影在线观看| 午夜视频一区二区三区| 欧美一级欧美一级在线播放| 亚洲一级在线观看| 欧美午夜片在线观看| 亚洲综合偷拍欧美一区色| 色婷婷av一区二区三区软件| 欧美激情中文字幕一区二区| 高清国产一区二区| 国产欧美一区二区三区在线看蜜臀| 国产伦精品一区二区三区视频青涩 | 欧美日韩一区二区三区免费看| 一区二区三区久久| 欧美日韩一区二区欧美激情 | 国产精品不卡一区| 99久久免费国产| 一区二区三区四区视频精品免费 | 国产麻豆91精品| 国产三级一区二区三区| 国产a久久麻豆| 国产精品欧美一区喷水| 不卡免费追剧大全电视剧网站| 亚洲色图制服诱惑| 欧美日韩一级二级三级| 老司机免费视频一区二区| 久久人人爽爽爽人久久久| 丰满亚洲少妇av| 亚洲视频免费观看| 欧美日韩激情一区| 免费成人在线视频观看| 这里只有精品电影| 国产在线一区二区| 亚洲国产精品成人综合| 色综合视频一区二区三区高清| 一区二区三区蜜桃网| 欧美一级高清片在线观看| 精品一区二区三区视频在线观看 | 亚洲国产毛片aaaaa无费看| 欧美顶级少妇做爰| 国产自产高清不卡| 亚洲色大成网站www久久九九| 欧美精品第1页| 欧美日韩一区二区在线观看| 视频一区视频二区中文字幕| 日韩午夜在线观看视频| 成人一级视频在线观看| 亚洲一区二区三区四区的| 欧美精品v日韩精品v韩国精品v| 国产一区二区三区四区五区美女| 中文字幕一区二区三区在线不卡| 欧美在线免费观看视频| 免费高清在线视频一区·| 国产精品久久久久久久第一福利 | 在线精品视频小说1| 日韩成人一级大片|