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

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

?? portisr.c

?? STM32 FreeRTOS v5.2移植源代碼
?? C
字號:
/*
	FreeRTOS.org V5.2.0 - Copyright (C) 2003-2009 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 (version 2) as published
	by the Free Software Foundation and modified by the FreeRTOS exception.

	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 is included to allow you 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.


	***************************************************************************
	*                                                                         *
	* Get the FreeRTOS eBook!  See http://www.FreeRTOS.org/Documentation      *
	*                                                                         *
	* This is a concise, step by step, 'hands on' guide that describes both   *
	* general multitasking concepts and FreeRTOS specifics. It presents and   *
	* explains numerous examples that are written using the FreeRTOS API.     *
	* Full source code for all the examples is provided in an accompanying    *
	* .zip file.                                                              *
	*                                                                         *
	***************************************************************************

	1 tab == 4 spaces!

	Please ensure to read the configuration and relevant port sections of the
	online documentation.

	http://www.FreeRTOS.org - Documentation, latest information, license and
	contact details.

	http://www.SafeRTOS.com - A version that is certified for use in safety
	critical systems.

	http://www.OpenRTOS.com - Commercial support, development, porting,
	licensing and training services.
*/


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

/*
*/

/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"

/* Constants required to handle critical sections. */
#define portNO_CRITICAL_NESTING		( ( unsigned portLONG ) 0 )

volatile unsigned portLONG ulCriticalNesting = 9999UL;

/*-----------------------------------------------------------*/

/* 
 * 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. */
	asm volatile (														\
	"LDR		R0, =pxCurrentTCB								\n\t"	\
	"LDR		R0, [R0]										\n\t"	\
	"LDR		LR, [R0]										\n\t"	\
																		\
	/* The critical nesting depth is the first item on the stack. */	\
	/* Load it into the ulCriticalNesting variable. */					\
	"LDR		R0, =ulCriticalNesting							\n\t"	\
	"LDMFD	LR!, {R1}											\n\t"	\
	"STR		R1, [R0]										\n\t"	\
																		\
	/* Get the SPSR from the stack. */									\
	"LDMFD	LR!, {R0}											\n\t"	\
	"MSR		SPSR, R0										\n\t"	\
																		\
	/* Restore all system mode registers for the task. */				\
	"LDMFD	LR, {R0-R14}^										\n\t"	\
	"NOP														\n\t"	\
																		\
	/* Restore the return address. */									\
	"LDR		LR, [LR, #+60]									\n\t"	\
																		\
	/* And return - correcting the offset in the LR to obtain the */	\
	/* correct address. */												\
	"SUBS PC, LR, #4											\n\t"	\
	);																	
}
/*-----------------------------------------------------------*/

void vPortTickISR( void )
{
	/* Increment the RTOS tick count, then look for the highest priority 
	task that is ready to run. */
	vTaskIncrementTick();
	
	#if configUSE_PREEMPTION == 1
		vTaskSwitchContext();
	#endif
			
	/* Ready for the next interrupt. */
	TB_ClearITPendingBit( TB_IT_Update );	
}

/*-----------------------------------------------------------*/

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

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一区二区三区免费野_久草精品视频
色综合天天综合狠狠| 777久久久精品| 欧美成人精品二区三区99精品| 一区二区三区美女视频| 成人国产精品免费| 欧美国产精品专区| 奇米影视在线99精品| 7777女厕盗摄久久久| 免费黄网站欧美| 亚洲高清免费一级二级三级| 欧美日韩国产一二三| 亚洲自拍偷拍综合| 欧美亚洲国产一区二区三区va| 亚洲高清免费在线| 日韩免费看网站| 成人午夜电影小说| 亚洲一区二区高清| 日韩欧美色综合| 成人h精品动漫一区二区三区| 亚洲乱码国产乱码精品精小说| 欧美剧情片在线观看| 国产激情一区二区三区| 亚洲欧美另类综合偷拍| 欧美一区二区三区精品| 懂色中文一区二区在线播放| 亚洲裸体xxx| 精品久久久久av影院| 91麻豆国产香蕉久久精品| 蜜桃av噜噜一区| 国产资源在线一区| 久久久美女艺术照精彩视频福利播放| av亚洲精华国产精华精华| 亚洲精品视频免费看| 91麻豆精品国产| fc2成人免费人成在线观看播放| 亚洲成人免费av| 日本一区二区三区四区| 在线欧美小视频| 国产一区二区毛片| 亚洲五码中文字幕| 中文字幕不卡在线观看| 欧美高清视频一二三区| av综合在线播放| 激情久久久久久久久久久久久久久久| 一区二区三区久久| 中文一区在线播放| 精品女同一区二区| 欧美日韩极品在线观看一区| a4yy欧美一区二区三区| 另类小说综合欧美亚洲| 亚洲成人综合在线| 国产女人18毛片水真多成人如厕 | 国产在线视视频有精品| 国产精品国产三级国产aⅴ入口| 欧美日韩一区 二区 三区 久久精品| 激情深爱一区二区| 日韩va亚洲va欧美va久久| 一区二区三区不卡视频| 国产精品福利一区二区| 久久―日本道色综合久久| 亚洲欧洲精品一区二区三区| 欧美mv日韩mv国产| 这里是久久伊人| 欧美日韩国产免费一区二区| 色婷婷国产精品久久包臀| av一区二区三区黑人| 成人三级伦理片| 韩日精品视频一区| 国产一区高清在线| 国内偷窥港台综合视频在线播放| www.欧美色图| 成人免费一区二区三区视频 | 久久99精品久久久久久动态图| 亚洲午夜在线电影| 亚洲一区二区三区精品在线| 亚洲色欲色欲www在线观看| 国产精品二三区| 亚洲三级小视频| 亚洲乱码中文字幕| 亚洲永久精品大片| 婷婷开心激情综合| 青青草视频一区| 久久97超碰国产精品超碰| 精品一区二区三区久久久| 经典三级视频一区| 国产二区国产一区在线观看| 国产成人免费9x9x人网站视频| 成人夜色视频网站在线观看| 国产高清亚洲一区| eeuss影院一区二区三区| 色综合中文字幕国产 | 99免费精品在线| jlzzjlzz欧美大全| 色综合久久88色综合天天免费| 91片黄在线观看| 在线观看91视频| 欧美一区二区三区在线视频| 精品少妇一区二区三区在线视频 | 精品蜜桃在线看| 久久久99精品久久| 中文字幕中文字幕在线一区| 亚洲另类在线一区| 日本欧洲一区二区| 国产麻豆精品视频| 91老司机福利 在线| 欧美日本一区二区三区四区| 日韩欧美国产系列| 中文字幕成人网| 亚洲国产精品久久不卡毛片| 蜜乳av一区二区| 国产91精品露脸国语对白| 91黄视频在线观看| 日韩免费视频一区| 亚洲欧洲99久久| 麻豆免费精品视频| 99精品欧美一区二区三区小说| 欧美日韩不卡一区| 日本一区二区三级电影在线观看| 亚洲综合在线电影| 韩日av一区二区| 中文字幕一区视频| 亚洲超碰97人人做人人爱| 久久久99免费| 亚洲精品国产一区二区精华液 | 久久你懂得1024| 亚洲综合自拍偷拍| 国产激情精品久久久第一区二区| 色香色香欲天天天影视综合网| 欧美一二三四在线| 亚洲人成网站色在线观看| 久久99精品久久久久久久久久久久 | 日韩女优制服丝袜电影| 亚洲免费在线看| 国产乱码精品一区二区三| 欧美美女一区二区| 最新高清无码专区| 国产成人精品一区二区三区网站观看| 欧美这里有精品| 成人欧美一区二区三区1314| 国产一区二区三区综合| 欧美久久久一区| 亚洲美女免费视频| 不卡一区二区在线| 久久久久久免费| 六月丁香婷婷色狠狠久久| 欧美自拍偷拍午夜视频| 国产精品久久久久永久免费观看 | 天天色 色综合| 丁香激情综合国产| 精品99一区二区三区| 日韩精品一二三四| 在线观看日韩毛片| 国产精品初高中害羞小美女文| 激情综合网av| 日韩精品中午字幕| 奇米影视一区二区三区| 欧美色网一区二区| 亚洲综合色区另类av| 99久久久国产精品| 国产精品视频在线看| 国产传媒一区在线| 久久精品一区二区三区av| 久久99精品久久只有精品| 日韩一级片在线观看| 日韩中文字幕不卡| 欧美一区二区高清| 日本麻豆一区二区三区视频| 欧美高清视频一二三区| 亚洲电影中文字幕在线观看| 欧美艳星brazzers| 国产精品久久免费看| 欧美国产欧美综合| 337p日本欧洲亚洲大胆色噜噜| 麻豆精品视频在线| 日韩一区二区在线看片| 久久97超碰色| 国产亚洲一区二区三区在线观看| 国产一区二区三区国产| 国产精品私人影院| 91蜜桃传媒精品久久久一区二区| 亚洲欧洲精品一区二区精品久久久 | 久久精品国产精品亚洲红杏| 精品理论电影在线观看| 国产剧情一区二区三区| 中文字幕精品—区二区四季| 成人av网址在线观看| 曰韩精品一区二区| 欧美另类z0zxhd电影| 蜜桃av噜噜一区二区三区小说| 久久人人超碰精品| av一区二区不卡| 亚洲一区精品在线| 日韩精品一区二区三区视频播放| 国产一区二区不卡老阿姨| 国产精品视频一二三区| 欧洲精品一区二区三区在线观看| 亚洲成人av一区| 久久久久国产精品麻豆ai换脸| jiyouzz国产精品久久| 亚洲二区视频在线|