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

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

?? portmacro.h

?? STM32 FreeRTOS v5.2移植源代碼
?? H
字號:
/*
	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.
*/

/*
	Changes from V3.2.3
	
	+ Modified portENTER_SWITCHING_ISR() to allow use with GCC V4.0.1.

	Changes from V3.2.4

	+ Removed the use of the %0 parameter within the assembler macros and 
	  replaced them with hard coded registers.  This will ensure the
	  assembler does not select the link register as the temp register as
	  was occasionally happening previously.

	+ The assembler statements are now included in a single asm block rather
	  than each line having its own asm block.

	Changes from V4.5.0

	+ Removed the portENTER_SWITCHING_ISR() and portEXIT_SWITCHING_ISR() macros
	  and replaced them with portYIELD_FROM_ISR() macro.  Application code 
	  should now make use of the portSAVE_CONTEXT() and portRESTORE_CONTEXT()
	  macros as per the V4.5.1 demo code.
*/

#ifndef PORTMACRO_H
#define PORTMACRO_H

#ifdef __cplusplus
extern "C" {
#endif

/*-----------------------------------------------------------
 * Port specific definitions.  
 *
 * The settings in this file configure FreeRTOS correctly for the
 * given hardware and compiler.
 *
 * These settings should not be altered.
 *-----------------------------------------------------------
 */

/* Type definitions. */
#define portCHAR		char
#define portFLOAT		float
#define portDOUBLE		double
#define portLONG		long
#define portSHORT		short
#define portSTACK_TYPE	unsigned portLONG
#define portBASE_TYPE	portLONG

#if( configUSE_16_BIT_TICKS == 1 )
	typedef unsigned portSHORT portTickType;
	#define portMAX_DELAY ( portTickType ) 0xffff
#else
	typedef unsigned portLONG portTickType;
	#define portMAX_DELAY ( portTickType ) 0xffffffff
#endif
/*-----------------------------------------------------------*/	

/* Architecture specifics. */
#define portSTACK_GROWTH			( -1 )
#define portTICK_RATE_MS			( ( portTickType ) 1000 / configTICK_RATE_HZ )		
#define portBYTE_ALIGNMENT			4
#define portNOP()					asm volatile ( "NOP" );
/*-----------------------------------------------------------*/	


/* Scheduler utilities. */

/*
 * portRESTORE_CONTEXT, portRESTORE_CONTEXT, portENTER_SWITCHING_ISR
 * and portEXIT_SWITCHING_ISR can only be called from ARM mode, but
 * are included here for efficiency.  An attempt to call one from
 * THUMB mode code will result in a compile time error.
 */

#define portRESTORE_CONTEXT()											\
{																		\
extern volatile void * volatile pxCurrentTCB;							\
extern volatile unsigned portLONG ulCriticalNesting;					\
																		\
	/* Set the LR to the task stack. */									\
	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 ) ulCriticalNesting;											\
	( void ) pxCurrentTCB;												\
}
/*-----------------------------------------------------------*/

#define portSAVE_CONTEXT()												\
{																		\
extern volatile void * volatile pxCurrentTCB;							\
extern volatile unsigned portLONG ulCriticalNesting;					\
																		\
	/* Push R0 as we are going to use the register. */					\
	asm volatile (														\
	"STMDB	SP!, {R0}											\n\t"	\
																		\
	/* Set R0 to point to the task stack pointer. */					\
	"STMDB	SP,{SP}^											\n\t"	\
	"NOP														\n\t"	\
	"SUB	SP, SP, #4											\n\t"	\
	"LDMIA	SP!,{R0}											\n\t"	\
																		\
	/* Push the return address onto the stack. */						\
	"STMDB	R0!, {LR}											\n\t"	\
																		\
	/* Now we have saved LR we can use it instead of R0. */				\
	"MOV	LR, R0												\n\t"	\
																		\
	/* Pop R0 so we can save it onto the system mode stack. */			\
	"LDMIA	SP!, {R0}											\n\t"	\
																		\
	/* Push all the system mode registers onto the task stack. */		\
	"STMDB	LR,{R0-LR}^											\n\t"	\
	"NOP														\n\t"	\
	"SUB	LR, LR, #60											\n\t"	\
																		\
	/* Push the SPSR onto the task stack. */							\
	"MRS	R0, SPSR											\n\t"	\
	"STMDB	LR!, {R0}											\n\t"	\
																		\
	"LDR	R0, =ulCriticalNesting								\n\t"	\
	"LDR	R0, [R0]											\n\t"	\
	"STMDB	LR!, {R0}											\n\t"	\
																		\
	/* Store the new top of stack for the task. */						\
	"LDR	R0, =pxCurrentTCB									\n\t"	\
	"LDR	R0, [R0]											\n\t"	\
	"STR	LR, [R0]											\n\t"	\
	);																	\
	( void ) ulCriticalNesting;											\
	( void ) pxCurrentTCB;												\
}


#define portYIELD_FROM_ISR()		vTaskSwitchContext()
#define portYIELD()					asm volatile ( "SWI" )
/*-----------------------------------------------------------*/


/* Critical section management. */

/*
 * The interrupt management utilities can only be called from ARM mode.  When
 * THUMB_INTERWORK is defined the utilities are defined as functions in 
 * portISR.c to ensure a switch to ARM mode.  When THUMB_INTERWORK is not 
 * defined then the utilities are defined as macros here - as per other ports.
 */

#ifdef THUMB_INTERWORK

	extern void vPortDisableInterruptsFromThumb( void ) __attribute__ ((naked));
	extern void vPortEnableInterruptsFromThumb( void ) __attribute__ ((naked));

	#define portDISABLE_INTERRUPTS()	vPortDisableInterruptsFromThumb()
	#define portENABLE_INTERRUPTS()		vPortEnableInterruptsFromThumb()
	
#else

	#define 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.						*/
			
	#define portENABLE_INTERRUPTS()												\
		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.						*/

#endif /* THUMB_INTERWORK */

extern void vPortEnterCritical( void );
extern void vPortExitCritical( void );

#define portENTER_CRITICAL()		vPortEnterCritical();
#define portEXIT_CRITICAL()			vPortExitCritical();
/*-----------------------------------------------------------*/

/* Task function macros as described on the FreeRTOS.org WEB site. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

#ifdef __cplusplus
}
#endif

#endif /* PORTMACRO_H */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区.www| 国产黄色精品视频| 精品一区二区三区久久| 国产v日产∨综合v精品视频| 欧美另类高清zo欧美| 欧美极品美女视频| 激情综合亚洲精品| 欧美日韩二区三区| 夜夜嗨av一区二区三区四季av | 激情六月婷婷综合| 欧美日韩mp4| 亚洲六月丁香色婷婷综合久久 | 欧美一级夜夜爽| 一区二区三区蜜桃| 91美女福利视频| 国产精品乱码一区二区三区软件 | 一区二区三区日本| 成人免费观看av| 久久久久久9999| 久久99精品久久只有精品| 欧美一区二区三区四区在线观看 | 美国毛片一区二区| 欧美巨大另类极品videosbest | 日韩精品一区二区三区视频播放 | 老司机午夜精品| 777奇米成人网| 午夜精品久久久久| 欧美综合一区二区三区| 亚洲精品国产一区二区精华液| 成人av网站免费| 一区二区中文视频| www.日韩av| 亚洲欧美国产77777| 91美女在线看| 亚洲一级片在线观看| 欧美最猛黑人xxxxx猛交| 亚洲精品自拍动漫在线| 色欧美日韩亚洲| 午夜精品久久久久影视| 欧美男女性生活在线直播观看| 午夜影院在线观看欧美| 欧美一区在线视频| 久久99国产精品免费网站| 精品对白一区国产伦| 高清在线不卡av| 成人欧美一区二区三区白人| 色欧美日韩亚洲| 五月综合激情婷婷六月色窝| 日韩无一区二区| 国产黄色精品网站| 一区二区三区中文在线观看| 欧美日韩三级一区二区| 毛片基地黄久久久久久天堂| 国产婷婷精品av在线| 99国产精品99久久久久久| 亚洲激情中文1区| 欧美一卡二卡在线观看| 国产成人精品三级| 亚洲黄色尤物视频| 日韩精品中文字幕在线不卡尤物| 国产成人免费高清| 亚洲午夜免费福利视频| 精品国产人成亚洲区| av中文一区二区三区| 婷婷夜色潮精品综合在线| 久久影院视频免费| 色狠狠一区二区三区香蕉| 七七婷婷婷婷精品国产| 中文字幕日韩av资源站| 欧美精品日韩综合在线| 成人精品在线视频观看| 日韩不卡一区二区| 国产精品福利一区| 精品国产污网站| 欧美性大战久久| 国产精品911| 喷白浆一区二区| 亚洲蜜臀av乱码久久精品| 精品国产成人系列| 欧美久久久久免费| 成人黄色网址在线观看| 久久精品久久99精品久久| 亚洲精品中文在线影院| 国产人成亚洲第一网站在线播放| 欧美日韩在线播放| 97se狠狠狠综合亚洲狠狠| 国产剧情av麻豆香蕉精品| 亚洲第一在线综合网站| 中文字幕亚洲欧美在线不卡| 欧美精品一区二区三区久久久| 在线观看亚洲一区| 99国产精品久久久| 成人永久看片免费视频天堂| 捆绑调教一区二区三区| 亚洲福利一二三区| 亚洲三级免费观看| 国产精品嫩草99a| 国产欧美一二三区| 久久综合九色综合欧美亚洲| 欧美男男青年gay1069videost| 91丨porny丨国产入口| 处破女av一区二区| 国产在线视频一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲成在人线免费| 亚洲午夜电影在线| 一区二区国产视频| 亚洲一区中文在线| 亚洲制服丝袜av| 亚洲综合在线五月| 亚洲香肠在线观看| 亚洲成人精品一区| 亚洲va国产va欧美va观看| 亚洲制服丝袜av| 亚洲成人三级小说| 奇米一区二区三区| 久久福利视频一区二区| 激情综合五月天| 国产乱人伦精品一区二区在线观看| 美国毛片一区二区三区| 极品少妇xxxx精品少妇偷拍| 紧缚捆绑精品一区二区| 国产一区999| 不卡影院免费观看| 91福利国产精品| 欧美巨大另类极品videosbest| 欧美一区二区精品久久911| 欧美一卡在线观看| 久久久久久久久久久久久女国产乱| 久久看人人爽人人| 成人欧美一区二区三区白人| 亚洲综合丁香婷婷六月香| 亚洲第四色夜色| 久久99热狠狠色一区二区| 国产成人精品网址| 91色视频在线| 欧美一区二区私人影院日本| 精品国产乱码久久久久久闺蜜| 国产偷国产偷精品高清尤物| 中文字幕亚洲视频| 日韩电影免费一区| 国产成人在线色| 欧洲精品视频在线观看| 日韩一区二区在线播放| 久久久久久免费网| 亚洲精品亚洲人成人网在线播放| 丝袜亚洲精品中文字幕一区| 精品午夜久久福利影院| 99re这里只有精品6| 91精品国产高清一区二区三区| 久久久久9999亚洲精品| 一区二区三区在线观看网站| 麻豆成人免费电影| 一本久久a久久免费精品不卡| 欧美精品一二三| 国产精品成人免费在线| 日本女优在线视频一区二区| 成人动漫一区二区在线| 91麻豆精品国产自产在线观看一区| 欧美激情艳妇裸体舞| 亚洲成a人片在线观看中文| 粉嫩一区二区三区性色av| 777久久久精品| 亚洲狼人国产精品| 国产在线精品一区在线观看麻豆| 91无套直看片红桃| 国产亚洲短视频| 婷婷激情综合网| 91麻豆免费观看| 久久久久久久久久久久久女国产乱 | 国产欧美一区二区在线观看| 午夜精品福利在线| 成人一级视频在线观看| 精品久久五月天| 亚洲成人综合在线| 91丨国产丨九色丨pron| 国产日产亚洲精品系列| 免费成人深夜小野草| 91偷拍与自偷拍精品| 亚洲国产精品激情在线观看| 欧美a级一区二区| 欧美日韩在线精品一区二区三区激情| 欧美激情一区二区三区在线| 久久国产成人午夜av影院| 91精品国产综合久久精品麻豆 | 99久久99久久精品国产片果冻| 精品精品国产高清a毛片牛牛 | 91久久国产综合久久| 国产精品萝li| 成人高清视频免费观看| 欧美国产成人在线| 成人免费看黄yyy456| 国产午夜亚洲精品午夜鲁丝片| 激情综合网最新| 久久久噜噜噜久噜久久综合| 久久精品国产亚洲5555| 日韩欧美高清dvd碟片| 美女爽到高潮91| 精品乱码亚洲一区二区不卡| 美女高潮久久久|