亚洲欧美第一页_禁久久精品乱码_粉嫩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 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.						*/
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲一区字幕| 久久色.com| 国产一区二区三区久久悠悠色av| 一区二区三区成人在线视频| 欧美国产禁国产网站cc| 国产女主播视频一区二区| 精品不卡在线视频| 2020国产精品自拍| 久久欧美一区二区| 久久久久久久综合色一本| 国产亚洲综合色| 国产精品理伦片| 99在线精品免费| 91麻豆国产福利在线观看| 麻豆91精品91久久久的内涵| 午夜久久久久久| 日本va欧美va瓶| 丝袜a∨在线一区二区三区不卡| 樱桃视频在线观看一区| 亚洲成人在线免费| 另类成人小视频在线| 久久av资源站| av资源网一区| 欧美丰满高潮xxxx喷水动漫| 精品电影一区二区| 国产精品视频观看| 一区二区三区不卡视频| 日韩精品三区四区| 国产另类ts人妖一区二区| kk眼镜猥琐国模调教系列一区二区 | 在线欧美一区二区| 7777精品伊人久久久大香线蕉最新版| 日韩情涩欧美日韩视频| 国产精品欧美一级免费| 午夜久久久久久电影| 韩国三级在线一区| 色成年激情久久综合| 日韩欧美视频一区| 国产精品久久久久久亚洲伦| 性欧美大战久久久久久久久| 极品少妇xxxx精品少妇偷拍| 成人av动漫网站| 正在播放亚洲一区| 国产精品成人免费精品自在线观看 | 国产精品影视天天线| 色八戒一区二区三区| 久久日韩粉嫩一区二区三区| 亚洲精品免费视频| 国产盗摄女厕一区二区三区| 亚洲精品一区二区三区99| 国产精品国产三级国产普通话蜜臀| 婷婷国产在线综合| 北条麻妃一区二区三区| 欧美va亚洲va| 亚洲gay无套男同| 不卡视频一二三四| 26uuu欧美| 久久精品国内一区二区三区| 色综合久久综合| 国产精品乱码一区二三区小蝌蚪| 日韩成人dvd| 欧美日韩一区二区在线视频| 国产精品亲子乱子伦xxxx裸| 国产一区二区三区不卡在线观看 | 中文字幕亚洲区| 日本免费在线视频不卡一不卡二| 色综合久久久久网| 国产农村妇女精品| 国产成人精品影院| 精品福利av导航| 久久av资源站| 欧美va天堂va视频va在线| 日韩av一区二区在线影视| 精品视频在线免费看| 亚洲免费在线看| 99久久精品99国产精品| 亚洲欧洲国产日韩| 99在线精品观看| 亚洲欧美区自拍先锋| 日本道色综合久久| 亚洲综合区在线| 精品视频色一区| 久久久久国产成人精品亚洲午夜| 久久99精品一区二区三区三区| 日韩三级视频在线观看| 久久精品99国产国产精| 日韩精品自拍偷拍| 成人精品电影在线观看| 国产欧美精品一区二区色综合朱莉| 国产精品一卡二| 中文字幕一区在线观看| 91免费观看在线| 午夜国产精品影院在线观看| 欧美一级一区二区| 国产综合久久久久久鬼色| 亚洲国产精品ⅴa在线观看| 成人福利视频在线| 伊人色综合久久天天人手人婷| 精品视频在线免费观看| 久久精品国产亚洲高清剧情介绍| 久久久国产午夜精品| eeuss鲁片一区二区三区在线观看| 亚洲欧美激情视频在线观看一区二区三区| 波多野结衣的一区二区三区| 夜夜嗨av一区二区三区网页| 日韩视频中午一区| 99精品欧美一区二区三区综合在线| 亚洲丝袜自拍清纯另类| 这里只有精品99re| 国产夫妻精品视频| 午夜精品爽啪视频| 久久精品一二三| 欧美亚洲图片小说| 国产精品亚洲午夜一区二区三区| 中文字幕一区二区三区在线播放 | 欧美性xxxxxx少妇| 国产在线精品一区二区三区不卡 | 91亚洲精品一区二区乱码| 午夜久久久久久久久| 国产精品三级电影| 91麻豆精品国产自产在线| av色综合久久天堂av综合| 日日摸夜夜添夜夜添精品视频| 国产欧美日本一区视频| 欧美日韩高清一区二区三区| 成人app网站| 乱中年女人伦av一区二区| 一区二区三区在线观看国产| 337p粉嫩大胆噜噜噜噜噜91av| 日本韩国一区二区三区视频| 国产成人综合网站| 日本成人中文字幕在线视频 | 色噜噜狠狠一区二区三区果冻| 美脚の诱脚舐め脚责91| 亚洲国产aⅴ成人精品无吗| 久久久久久久久久久久电影| 蜜臀av一区二区在线免费观看| 日韩一区二区电影| 99re热这里只有精品免费视频| 精品一区二区三区av| 亚洲不卡av一区二区三区| 日韩久久一区二区| 欧美国产视频在线| 精品久久久三级丝袜| 欧美一区二区精美| 欧美日韩国产经典色站一区二区三区| av在线这里只有精品| 国产在线一区观看| 激情深爱一区二区| 免费观看一级特黄欧美大片| 视频一区中文字幕国产| 亚洲午夜一区二区| 亚洲夂夂婷婷色拍ww47| 亚洲精品久久久蜜桃| 亚洲视频一区二区在线观看| 国产精品久久久久久久久图文区| 久久夜色精品国产噜噜av| 2020国产成人综合网| 久久综合成人精品亚洲另类欧美| 在线免费观看日本欧美| 91麻豆成人久久精品二区三区| 国产91高潮流白浆在线麻豆| 国产·精品毛片| 成人sese在线| 色综合一个色综合| 日本精品视频一区二区| 欧美日韩黄视频| 91精品在线免费观看| 日韩视频中午一区| 精品国产精品一区二区夜夜嗨| 久久夜色精品一区| 国产精品久久久爽爽爽麻豆色哟哟 | 国产欧美一区二区三区在线老狼| 欧美激情资源网| 中文字幕永久在线不卡| 亚洲sss视频在线视频| 蜜臀av亚洲一区中文字幕| 国产曰批免费观看久久久| jlzzjlzz亚洲日本少妇| 在线观看国产日韩| 91麻豆精品国产91久久久久久久久 | 午夜精品福利一区二区蜜股av| 亚洲综合网站在线观看| 亚洲大片精品永久免费| 蜜桃一区二区三区在线| 成人黄色电影在线| 在线观看网站黄不卡| 欧美一区二区视频在线观看2020| 精品国产三级电影在线观看| 中文字幕av不卡| 日韩制服丝袜av| 成人永久aaa| 欧美疯狂做受xxxx富婆| 国产亚洲一本大道中文在线| 一区二区三区四区高清精品免费观看| 日本成人在线不卡视频| av成人免费在线观看| 精品国产乱码久久久久久1区2区| 在线免费观看视频一区| 欧美精品一区视频|