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

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

?? port.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
	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.
	***************************************************************************
*/

/* 
Changes between V1.2.4 and V1.2.5

	+ Introduced portGLOBAL_INTERRUPT_FLAG definition to test the global 
	  interrupt flag setting.  Using the two bits defined within
	  portINITAL_INTERRUPT_STATE was causing the w register to get clobbered
	  before the test was performed.

Changes from V1.2.5

	+ Set the interrupt vector address to 0x08.  Previously it was at the
	  incorrect address for compatibility mode of 0x18.

Changes from V2.1.1

	+ PCLATU and PCLATH are now saved as part of the context.  This allows
	  function pointers to be used within tasks.  Thanks to Javier Espeche
	  for the enhancement. 

Changes from V2.3.1

	+ TABLAT is now saved as part of the task context.
	
Changes from V3.2.0

	+ TBLPTRU is now initialised to zero as the MPLAB compiler expects this
	  value and does not write to the register.
*/

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

/* MPLAB library include file. */
#include "timers.h"

/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for the PIC port.
 *----------------------------------------------------------*/

/* Hardware setup for tick. */
#define portTIMER_FOSC_SCALE			( ( unsigned portLONG ) 4 )

/* Initial interrupt enable state for newly created tasks.  This value is
copied into INTCON when a task switches in for the first time. */
#define portINITAL_INTERRUPT_STATE			0xc0

/* Just the bit within INTCON for the global interrupt flag. */
#define portGLOBAL_INTERRUPT_FLAG			0x80

/* Constant used for context switch macro when we require the interrupt 
enable state to be unchanged when the interrupted task is switched back in. */
#define portINTERRUPTS_UNCHANGED			0x00

/* Some memory areas get saved as part of the task context.  These memory
area's get used by the compiler for temporary storage, especially when 
performing mathematical operations, or when using 32bit data types.  This
constant defines the size of memory area which must be saved. */
#define portCOMPILER_MANAGED_MEMORY_SIZE	( ( unsigned portCHAR ) 0x13 )

/* We require the address of the pxCurrentTCB variable, but don't want to know
any details of its type. */
typedef void tskTCB;
extern volatile tskTCB * volatile pxCurrentTCB;

/* IO port constants. */
#define portBIT_SET		( ( unsigned portCHAR ) 1 )
#define portBIT_CLEAR	( ( unsigned portCHAR ) 0 )

/*
 * The serial port ISR's are defined in serial.c, but are called from portable
 * as they use the same vector as the tick ISR.
 */
void vSerialTxISR( void );
void vSerialRxISR( void );

/*
 * Perform hardware setup to enable ticks.
 */
static void prvSetupTimerInterrupt( void );

/* 
 * ISR to maintain the tick, and perform tick context switches if the
 * preemptive scheduler is being used.
 */
static void prvTickISR( void );

/*
 * ISR placed on the low priority vector.  This calls the appropriate ISR for
 * the actual interrupt.
 */
static void prvLowInterrupt( void );

/* 
 * Macro that pushes all the registers that make up the context of a task onto
 * the stack, then saves the new top of stack into the TCB.
 * 
 * If this is called from an ISR then the interrupt enable bits must have been 
 * set for the ISR to ever get called.  Therefore we want to save the INTCON
 * register with the enable bits forced to be set - and ucForcedInterruptFlags 
 * must contain these bit settings.  This means the interrupts will again be
 * enabled when the interrupted task is switched back in.
 *
 * If this is called from a manual context switch (i.e. from a call to yield),
 * then we want to save the INTCON so it is restored with its current state,
 * and ucForcedInterruptFlags must be 0.  This allows a yield from within
 * a critical section.
 *
 * The compiler uses some locations at the bottom of the memory for temporary
 * storage during math and other computations.  This is especially true if
 * 32bit data types are utilised (as they are by the scheduler).  The .tmpdata
 * and MATH_DATA sections have to be stored in there entirety as part of a task
 * context.  This macro stores from data address 0x00 to 
 * portCOMPILER_MANAGED_MEMORY_SIZE.  This is sufficient for the demo 
 * applications but you should check the map file for your project to ensure 
 * this is sufficient for your needs.  It is not clear whether this size is 
 * fixed for all compilations or has the potential to be program specific.
 */
#define	portSAVE_CONTEXT( ucForcedInterruptFlags )								\
{																				\
	_asm																		\
		/* Save the status and WREG registers first, as these will get modified	\
		by the operations below. */												\
		MOVFF	WREG, PREINC1													\
		MOVFF   STATUS, PREINC1													\
		/* Save the INTCON register with the appropriate bits forced if			\
		necessary - as described above. */										\
		MOVFF	INTCON, WREG													\
		IORLW	ucForcedInterruptFlags											\
		MOVFF	WREG, PREINC1													\
	_endasm																		\
																				\
	portDISABLE_INTERRUPTS();													\
																				\
	_asm																		\
		/* Store the necessary registers to the stack. */						\
		MOVFF	BSR, PREINC1													\
		MOVFF	FSR2L, PREINC1													\
		MOVFF	FSR2H, PREINC1													\
		MOVFF	FSR0L, PREINC1													\
		MOVFF	FSR0H, PREINC1													\
		MOVFF	TABLAT, PREINC1													\
		MOVFF	TBLPTRU, PREINC1												\
		MOVFF	TBLPTRH, PREINC1												\
		MOVFF	TBLPTRL, PREINC1												\
		MOVFF	PRODH, PREINC1													\
		MOVFF	PRODL, PREINC1													\
		MOVFF	PCLATU, PREINC1													\
		MOVFF	PCLATH, PREINC1													\
		/* Store the .tempdata and MATH_DATA areas as described above. */		\
		CLRF	FSR0L, 0														\
		CLRF	FSR0H, 0														\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	POSTINC0, PREINC1												\
		MOVFF	INDF0, PREINC1													\
		MOVFF	FSR0L, PREINC1													\
		MOVFF	FSR0H, PREINC1													\
		/* Store the hardware stack pointer in a temp register before we		\
		modify it. */															\
		MOVFF	STKPTR, FSR0L													\
	_endasm																		\
																				\
		/* Store each address from the hardware stack. */						\
		while( STKPTR > ( unsigned portCHAR ) 0 )								\
		{																		\
			_asm																\
				MOVFF	TOSL, PREINC1											\
				MOVFF	TOSH, PREINC1											\
				MOVFF	TOSU, PREINC1											\
				POP																\
			_endasm																\
		}																		\
																				\
	_asm																		\
		/* Store the number of addresses on the hardware stack (from the		\
		temporary register). */													\
		MOVFF	FSR0L, PREINC1													\
		MOVF	PREINC1, 1, 0													\
	_endasm																		\
																				\
	/* Save the new top of the software stack in the TCB. */					\
	_asm																		\
		MOVFF	pxCurrentTCB, FSR0L												\
		MOVFF	pxCurrentTCB + 1, FSR0H											\
		MOVFF	FSR1L, POSTINC0													\
		MOVFF	FSR1H, POSTINC0													\
	_endasm																		\
}
/*-----------------------------------------------------------*/

/*
 * This is the reverse of portSAVE_CONTEXT.  See portSAVE_CONTEXT for more
 * details.
 */
#define portRESTORE_CONTEXT()													\
{																				\
	_asm																		\
		/* Set FSR0 to point to pxCurrentTCB->pxTopOfStack. */					\
		MOVFF	pxCurrentTCB, FSR0L												\
		MOVFF	pxCurrentTCB + 1, FSR0H											\
																				\
		/* De-reference FSR0 to set the address it holds into FSR1.				\
		(i.e. *( pxCurrentTCB->pxTopOfStack ) ). */								\
		MOVFF	POSTINC0, FSR1L													\
		MOVFF	POSTINC0, FSR1H													\
																				\
		/* How many return addresses are there on the hardware stack?  Discard	\
		the first byte as we are pointing to the next free space. */			\
		MOVFF	POSTDEC1, FSR0L													\
		MOVFF	POSTDEC1, FSR0L													\
	_endasm																		\
																				\
	/* Fill the hardware stack from our software stack. */						\
	STKPTR = 0;																	\
																				\
	while( STKPTR < FSR0L )														\
	{																			\
		_asm																	\
			PUSH																\
			MOVF	POSTDEC1, 0, 0												\
			MOVWF	TOSU, 0														\
			MOVF	POSTDEC1, 0, 0												\
			MOVWF	TOSH, 0														\
			MOVF	POSTDEC1, 0, 0												\
			MOVWF	TOSL, 0														\
		_endasm																	\
	}																			\
																				\
	_asm																		\
		/* Restore the .tmpdata and MATH_DATA memory. */						\
		MOVFF	POSTDEC1, FSR0H													\
		MOVFF	POSTDEC1, FSR0L													\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, POSTDEC0												\
		MOVFF	POSTDEC1, INDF0													\
		/* Restore the other registers forming the tasks context. */			\
		MOVFF	POSTDEC1, PCLATH												\
		MOVFF	POSTDEC1, PCLATU												\
		MOVFF	POSTDEC1, PRODL													\
		MOVFF	POSTDEC1, PRODH													\
		MOVFF	POSTDEC1, TBLPTRL												\
		MOVFF	POSTDEC1, TBLPTRH												\
		MOVFF	POSTDEC1, TBLPTRU												\
		MOVFF	POSTDEC1, TABLAT												\
		MOVFF	POSTDEC1, FSR0H													\
		MOVFF	POSTDEC1, FSR0L													\

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕国产精品一区二区| 亚洲成年人影院| 亚洲欧美日韩国产一区二区三区| 亚洲成人免费在线观看| 国产91精品入口| 欧美一级免费大片| 一个色综合av| 成人免费视频播放| 久久亚洲欧美国产精品乐播| 亚洲国产精品久久不卡毛片| 不卡一二三区首页| 国产亚洲人成网站| 久久不见久久见免费视频1| 色悠久久久久综合欧美99| 国产欧美日韩不卡| 麻豆精品一区二区综合av| 欧美日韩视频第一区| 国产精品毛片高清在线完整版| 美美哒免费高清在线观看视频一区二区 | 毛片不卡一区二区| 在线观看精品一区| 中文字幕av资源一区| 精品一区二区在线视频| 91精品国产综合久久香蕉麻豆 | 石原莉奈在线亚洲二区| 色噜噜狠狠成人网p站| 中文字幕综合网| av日韩在线网站| 国产亚洲成aⅴ人片在线观看| 九一九一国产精品| 日韩精品一区二区三区蜜臀 | 欧美大片拔萝卜| 青青草原综合久久大伊人精品| 欧美在线综合视频| 亚洲午夜精品久久久久久久久| 色94色欧美sute亚洲线路二| 亚洲欧美综合另类在线卡通| 成人av在线影院| 国产精品的网站| av亚洲精华国产精华| ...xxx性欧美| 欧洲av一区二区嗯嗯嗯啊| 一区二区三区小说| 欧美日韩在线播放三区| 日韩黄色片在线观看| 日韩精品自拍偷拍| 国产伦精品一区二区三区免费| 国产视频视频一区| 99久久精品99国产精品| 亚洲一区二区欧美| 欧美一区二区三区四区在线观看| 蜜桃视频一区二区| 国产亚洲欧洲997久久综合| 成人网页在线观看| 夜夜嗨av一区二区三区| 在线不卡免费欧美| 国产美女视频一区| 亚洲欧美日韩久久精品| 在线成人午夜影院| 国产毛片精品视频| 国产精品视频一区二区三区不卡| 91黄色激情网站| 蜜桃久久av一区| 中文字幕欧美国产| 欧美色爱综合网| 激情文学综合插| 亚洲欧美视频一区| 精品欧美一区二区在线观看| www.在线成人| 日本中文字幕一区二区视频 | 成人污视频在线观看| 亚洲国产欧美在线| 国产亚洲一区二区三区在线观看 | 欧美一区二区三区在线观看| 国产乱子轮精品视频| 亚洲激情男女视频| 2024国产精品视频| 欧美视频精品在线| 成人一级黄色片| 免费观看一级特黄欧美大片| 亚洲色图制服诱惑 | 一区免费观看视频| 日韩亚洲欧美成人一区| 91视频国产资源| 国产一区视频在线看| 午夜精品一区二区三区免费视频| 久久久.com| 日韩亚洲欧美在线观看| 91高清视频免费看| 成人午夜电影网站| 精品无人区卡一卡二卡三乱码免费卡 | 亚洲地区一二三色| 国产精品不卡一区二区三区| 久久午夜国产精品| 欧美肥大bbwbbw高潮| 91精彩视频在线| 不卡电影一区二区三区| 国产剧情av麻豆香蕉精品| 日韩va欧美va亚洲va久久| 亚洲影视在线播放| 中文字幕一区二区三区精华液| 久久久久久久久久久99999| 欧美精品第一页| 欧美午夜电影网| 91免费国产在线观看| 成人夜色视频网站在线观看| 极品少妇一区二区| 老司机精品视频一区二区三区| 亚洲成在人线在线播放| 亚洲制服丝袜av| 亚洲精品你懂的| 亚洲精品免费在线| 亚洲视频在线一区二区| 国产精品美女一区二区| 欧美高清在线精品一区| 日本一区二区三区电影| 欧美激情中文字幕一区二区| 日本一区二区综合亚洲| 欧美国产日本韩| 国产婷婷一区二区| 国产精品免费视频网站| 最近日韩中文字幕| 亚洲精品成人精品456| 亚洲在线视频一区| 性做久久久久久免费观看欧美| 亚洲123区在线观看| 蜜桃在线一区二区三区| 另类小说综合欧美亚洲| 国产乱码精品一品二品| 国产suv一区二区三区88区| www.亚洲在线| 欧美系列一区二区| 欧美成人a∨高清免费观看| 国产亚洲综合在线| 亚洲欧洲一区二区三区| 亚洲一区二区在线免费观看视频| 偷窥少妇高潮呻吟av久久免费| 日韩av二区在线播放| 国产麻豆成人精品| 91蝌蚪porny| 91精品啪在线观看国产60岁| 久久在线免费观看| 日韩伦理免费电影| 日韩精品国产精品| 国产乱一区二区| 91丨porny丨国产| 欧美一区二区性放荡片| 国产精品蜜臀av| 日韩精品乱码免费| 成人小视频在线| 欧美久久一二三四区| 欧美激情在线免费观看| 偷拍一区二区三区四区| 国产+成+人+亚洲欧洲自线| 色婷婷av一区二区三区gif| 精品日韩在线一区| 亚洲免费三区一区二区| 精品亚洲国产成人av制服丝袜 | 国产精品国产三级国产aⅴ原创 | 欧美日韩一区高清| 久久久久久久av麻豆果冻| 亚洲精品高清在线观看| 国产一区二区电影| 欧美日韩一本到| 国产精品天天看| 免费精品视频最新在线| 91免费观看在线| 久久精品亚洲精品国产欧美kt∨| 亚洲一区二区成人在线观看| 国产69精品一区二区亚洲孕妇 | 久久久久高清精品| 亚洲国产视频在线| av色综合久久天堂av综合| 欧美成人高清电影在线| 五月天亚洲婷婷| 91原创在线视频| 国产喂奶挤奶一区二区三区| 久久精品国产久精国产爱| 欧美日韩黄色一区二区| 亚洲视频免费在线| 成人激情黄色小说| 欧美精品一区二| 老司机精品视频线观看86| 欧美日韩一本到| 亚洲国产综合在线| 色综合久久久久久久久| 国产欧美日韩久久| 国产不卡视频在线观看| 精品日韩欧美一区二区| 日韩精品乱码免费| 欧美人xxxx| 午夜欧美电影在线观看| 欧美色图激情小说| 一区二区三区四区在线播放| 91在线国产福利| 日韩美女视频一区二区| 91欧美激情一区二区三区成人| 国产精品久久久久9999吃药| 成人免费视频视频在线观看免费| 久久久久99精品一区|