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

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

?? 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"

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费日本视频一区| 色欲综合视频天天天| 美女mm1313爽爽久久久蜜臀| 一区二区三区中文免费| 中文字幕av一区二区三区| 久久精品夜夜夜夜久久| 国产午夜精品久久| 欧美激情综合五月色丁香| 中文字幕免费在线观看视频一区| 欧美激情一区二区三区全黄 | 国产精品乱码一区二区三区软件| 久久色成人在线| 国产午夜精品美女毛片视频| 国产香蕉久久精品综合网| 国产精品三级在线观看| 国产精品久线在线观看| 亚洲人被黑人高潮完整版| 亚洲精品免费在线观看| 亚洲国产精品久久一线不卡| 日韩福利视频网| 蜜臀av性久久久久av蜜臀妖精| 极品美女销魂一区二区三区免费| 国产精品综合久久| eeuss鲁一区二区三区| 在线观看视频91| 制服丝袜亚洲精品中文字幕| 欧美成人官网二区| 国产嫩草影院久久久久| 亚洲美女在线一区| 免费观看日韩av| 国产91对白在线观看九色| 91丨porny丨中文| 制服视频三区第一页精品| 久久午夜羞羞影院免费观看| 国产精品二三区| 香蕉加勒比综合久久 | 91精品久久久久久久91蜜桃| 精品999久久久| 综合激情成人伊人| 日本成人中文字幕在线视频| 国产91精品一区二区麻豆网站| 91国偷自产一区二区三区成为亚洲经典| 91麻豆精品国产91久久久久| 国产欧美精品在线观看| 亚洲成人精品影院| 国产高清不卡一区二区| 精品视频1区2区3区| 久久综合色之久久综合| 亚洲狼人国产精品| 久久99精品国产.久久久久久| av不卡免费电影| 欧美电影精品一区二区| 亚洲美腿欧美偷拍| 国产乱色国产精品免费视频| 欧美性猛片xxxx免费看久爱| 欧美精品一区二区三区很污很色的 | 日韩免费高清av| 国产精品久久久久久久浪潮网站 | 国产黄色91视频| 精品视频免费在线| 国产精品久久久久国产精品日日 | www.欧美日韩国产在线| 91.麻豆视频| 亚洲人妖av一区二区| 国内精品国产三级国产a久久| 欧美午夜在线观看| 国产精品女人毛片| 久久精品国产**网站演员| 在线观看免费亚洲| 国产精品视频第一区| 久久99久久99| 欧美精品第1页| 亚洲欧美一区二区三区极速播放 | 色综合久久久久综合| 2021国产精品久久精品| 亚洲成a人v欧美综合天堂下载| www.成人网.com| 久久综合久久99| 美腿丝袜在线亚洲一区| 欧美在线播放高清精品| 亚洲天堂av一区| 懂色av一区二区夜夜嗨| 久久一区二区三区四区| 蜜臀va亚洲va欧美va天堂| 欧美日韩国产一区| 亚洲尤物在线视频观看| 91麻豆精东视频| 亚洲色欲色欲www| 91小视频免费观看| 中文字幕一区在线| 成人h精品动漫一区二区三区| 国产亚洲欧美日韩在线一区| 美国欧美日韩国产在线播放| 欧美精品在线一区二区| 亚洲国产aⅴ成人精品无吗| 色哦色哦哦色天天综合| 亚洲激情图片小说视频| 一本大道久久a久久综合| 日韩一区中文字幕| 97se狠狠狠综合亚洲狠狠| 国产精品欧美久久久久无广告 | 欧美精品一区二区高清在线观看| 日韩中文字幕亚洲一区二区va在线 | 亚洲精品欧美专区| 在线影视一区二区三区| 亚洲激情男女视频| 欧美三级日韩三级| 天天综合色天天| 日韩欧美一级二级三级| 久久99精品久久久久久国产越南 | 色综合久久中文字幕综合网| 国产精品美女一区二区| 99国产精品久久久久久久久久 | 日本亚洲免费观看| 欧美一级久久久| 狠狠色丁香婷综合久久| 久久久久久麻豆| 成人午夜在线视频| 成人欧美一区二区三区视频网页 | 日韩欧美一二三区| 国产在线精品免费av| 日本一区二区成人在线| av电影天堂一区二区在线| 一区二区高清在线| 91精品国产高清一区二区三区| 麻豆成人久久精品二区三区小说| 久久一日本道色综合| 成人h版在线观看| 亚洲国产精品一区二区www| 91精品国产综合久久精品| 韩国三级在线一区| 中文字幕亚洲综合久久菠萝蜜| 日本丰满少妇一区二区三区| 三级久久三级久久| 久久久久久麻豆| 色老头久久综合| 美女视频黄 久久| 国产精品网站一区| 欧美三片在线视频观看| 国产资源精品在线观看| 亚洲日本免费电影| 欧美日韩另类一区| 国产精品一区免费视频| 一区二区三区免费| 欧美成人精品福利| 日本精品视频一区二区| 精品一区二区三区视频在线观看| 国产精品网友自拍| 7777精品伊人久久久大香线蕉完整版 | 蜜臀国产一区二区三区在线播放| 国产日本欧洲亚洲| 欧美日韩一级片网站| 国产精品一区二区三区乱码| 亚洲免费视频成人| 精品福利在线导航| 欧美影视一区在线| 国产精品综合在线视频| 福利视频网站一区二区三区| 亚洲一区在线观看网站| 国产亚洲成av人在线观看导航| 欧美性受极品xxxx喷水| 国产成人精品亚洲日本在线桃色| 亚洲国产欧美日韩另类综合| 国产日韩精品一区二区三区| 欧美日韩一区高清| 成人激情黄色小说| 久久66热偷产精品| 一区二区三区在线视频观看58| 26uuu成人网一区二区三区| 欧美影院精品一区| 波多野结衣视频一区| 韩国一区二区在线观看| 日韩影院精彩在线| 亚洲免费视频成人| 国产精品午夜电影| 久久久久一区二区三区四区| 欧美日本一区二区三区| 99久久精品免费看| 国产成人精品一区二区三区四区| 青青草一区二区三区| 亚洲国产美国国产综合一区二区| 一区在线观看免费| 国产网站一区二区| 精品成人一区二区三区四区| 这里只有精品视频在线观看| 在线日韩一区二区| 91在线观看地址| 成人国产一区二区三区精品| 国产自产2019最新不卡| 久久综合综合久久综合| 日韩精品五月天| 午夜精品成人在线| 亚洲国产日韩a在线播放性色| 亚洲人成在线播放网站岛国| 欧美激情在线观看视频免费| 久久久精品免费网站| 久久综合999| 久久一区二区三区四区| 精品国产乱码久久久久久免费 | 日韩精品电影在线观看|