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

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

?? port.c

?? FREE_RTOS一個(gè)FREE的小型操作系統(tǒng).
?? C
字號(hào):
/*
	FreeRTOS V3.2.0 - Copyright (C) 2003 - 2005 Richard Barry.

	This file is part of the FreeRTOS distribution.

	FreeRTOS 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 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; 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, 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.
	***************************************************************************
*/

/* 
Changes from V3.0.0
	+ ucCriticalNesting is now initialised to 0x7F to prevent interrupts from being
          handled before the scheduler is started.

Changes from V3.0.1
*/

/* Scheduler include files. */
#include <FreeRTOS.h>
#include <task.h>

#include <malloc.h>

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

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

/*
 * Define minimal-stack constants
 * -----
 * FSR's:
 *		STATUS, WREG, BSR, PRODH, PRODL, FSR0H, FSR0L,
 *		FSR1H, FSR1L,TABLAT, (TBLPTRU), TBLPTRH, TBLPTRL,
 *		(PCLATU), PCLATH
 *		sfr's within parenthesis only on devices > 64kB
 * -----
 * Call/Return stack:
 *		 2 bytes per entry on devices <= 64kB
 *		 3 bytes per entry on devices >  64kB
 * -----
 * Other bytes:
 *		 2 bytes: FunctionParameter for initial taskcode
 *		 1 byte : Number of entries on call/return stack
 *		 1 byte : ucCriticalNesting
 *		16 bytes: Free space on stack
 */
#if _ROMSIZE > 0x8000
	#define portSTACK_FSR_BYTES				( 15 )
	#define portSTACK_CALLRETURN_ENTRY_SIZE	(  3 )
#else
	#define portSTACK_FSR_BYTES				( 13 )
	#define portSTACK_CALLRETURN_ENTRY_SIZE	(  2 )
#endif

#define portSTACK_MINIMAL_CALLRETURN_DEPTH	(  8 )
#define portSTACK_OTHER_BYTES				( 20 )

unsigned portSHORT usCalcMinStackSize		= 0;

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

/*
 * We initialise ucCriticalNesting to the middle value an 
 * unsigned char can contain. This way portENTER_CRITICAL()
 * and portEXIT_CRITICAL() can be called without interrupts
 * being enabled before the scheduler starts.
 */
register unsigned portCHAR ucCriticalNesting = 0x7F;

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

/* 
 * Initialise the stack of a new task.
 * See portSAVE_CONTEXT macro for description. 
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{
unsigned portCHAR ucScratch;
	/*
	 * Get the size of the RAMarea in page 0 used by the compiler
	 * We do this here already to avoid W-register conflicts.
	 */
	_Pragma("asm")
		movlw	OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
		movwf	PRODL,ACCESS		; PRODL is used as temp register
	_Pragma("asmend")
	ucScratch = PRODL;

	/*
	 * Place a few bytes of known values on the bottom of the stack. 
	 * This is just useful for debugging.
	 */
//	*pxTopOfStack--	= 0x11;
//	*pxTopOfStack-- = 0x22;
//	*pxTopOfStack-- = 0x33;

	/*
	 * Simulate how the stack would look after a call to vPortYield()
	 * generated by the compiler.
	 */

	/*
	 * First store the function parameters.  This is where the task expects
	 * to find them when it starts running.
	 */
	*pxTopOfStack-- = ( portSTACK_TYPE ) ( (( unsigned portSHORT ) pvParameters >> 8) & 0x00ff );
	*pxTopOfStack-- = ( portSTACK_TYPE ) (  ( unsigned portSHORT ) pvParameters       & 0x00ff );

	/*
	 * Next are all the registers that form part of the task context.
	 */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x11; /* STATUS. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x22; /* WREG. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x33; /* BSR. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x44; /* PRODH. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x55; /* PRODL. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x66; /* FSR0H. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x77; /* FSR0L. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x88; /* FSR1H. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0x99; /* FSR1L. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0xAA; /* TABLAT. */
#if _ROMSIZE > 0x8000
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0xBB; /* TBLPTRU. */
#endif
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0xCC; /* TBLPTRH. */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0xDD; /* TBLPTRL. */
#if _ROMSIZE > 0x8000
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0xEE; /* PCLATU. */
#endif
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0xFF; /* PCLATH. */

	/*
	 * Next the compiler's scratchspace.
	 */
	while(ucScratch-- > 0)
	{
		*pxTopOfStack-- = ( portSTACK_TYPE ) 0;
	}
	
	/*
	 * The only function return address so far is the address of the task entry.
	 * The order is TOSU/TOSH/TOSL. For devices > 64kB, TOSU is put on the 
	 * stack, too. TOSU is always written as zero here because wizC does not allow
	 * functionpointers to point above 64kB in ROM.
	 */
#if _ROMSIZE > 0x8000
	*pxTopOfStack-- = ( portSTACK_TYPE ) 0;
#endif
	*pxTopOfStack-- = ( portSTACK_TYPE ) ( ( ( unsigned portSHORT ) pxCode >> 8 ) & 0x00ff );
	*pxTopOfStack-- = ( portSTACK_TYPE ) ( (   unsigned portSHORT ) pxCode        & 0x00ff );

	/*
	 * Store the number of return addresses on the hardware stack.
	 * So far only the address of the task entry point.
	 */
	*pxTopOfStack-- = ( portSTACK_TYPE ) 1;

	/*
	 * The code generated by wizC does not maintain separate
	 * stack and frame pointers. Therefore the portENTER_CRITICAL macro cannot 
	 * use the stack as per other ports.  Instead a variable is used to keep
	 * track of the critical section nesting.  This variable has to be stored
	 * as part of the task context and is initially set to zero.
	 */
	*pxTopOfStack-- = ( portSTACK_TYPE ) portNO_CRITICAL_SECTION_NESTING;	

	return pxTopOfStack;
}
/*-----------------------------------------------------------*/

unsigned portSHORT usPortCALCULATE_MINIMAL_STACK_SIZE( void )
{
	/*
	 * Fetch the size of compiler's scratchspace.
	 */
	_Pragma("asm")
		movlw	OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
		movlb	usCalcMinStackSize>>8
		movwf	usCalcMinStackSize,BANKED
	_Pragma("asmend")

	/*
	 * Add minimum needed stackspace
	 */
	usCalcMinStackSize	+=	( portSTACK_FSR_BYTES )
		+	( portSTACK_MINIMAL_CALLRETURN_DEPTH * portSTACK_CALLRETURN_ENTRY_SIZE )
		+	( portSTACK_OTHER_BYTES );

	return(usCalcMinStackSize);
}

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

portBASE_TYPE xPortStartScheduler( void )
{
	extern void portSetupTick( void );

	/*
	 * Setup a timer for the tick ISR for the preemptive scheduler.
	 */
	portSetupTick(); 

	/*
	 * Restore the context of the first task to run.
	 */
	portRESTORE_CONTEXT();

	/*
	 * This point should never be reached during execution.
	 */
	return pdTRUE;
}

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

void vPortEndScheduler( void )
{
	/*
	 * It is unlikely that the scheduler for the PIC port will get stopped
	 * once running. When called a reset is done which is probably the
	 * most valid action.
	 */
	_Pragma(asmline reset);
}

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

/*
 * Manual context switch.  This is similar to the tick context switch,
 * but does not increment the tick count.  It must be identical to the
 * tick context switch in how it stores the stack of a task.
 */
void vPortYield( void )
{
	/*
	 * Save the context of the current task.
	 */
	portSAVE_CONTEXT( portINTERRUPTS_UNCHANGED );

	/*
	 * Switch to the highest priority task that is ready to run.
	 */
	vTaskSwitchContext();

	/*
	 * Start executing the task we have just switched to.
	 */
	portRESTORE_CONTEXT();
}

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

void *pvPortMalloc( unsigned portSHORT usWantedSize )
{
void *pvReturn;

	vTaskSuspendAll();
	{
		pvReturn = malloc( ( malloc_t ) usWantedSize );
	}
	xTaskResumeAll();

	return pvReturn;
}

void vPortFree( void *pv )
{
	if( pv )
	{
		vTaskSuspendAll();
		{
			free( pv );
		}
		xTaskResumeAll();
	}
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人三级小说| 石原莉奈在线亚洲二区| 欧美性猛片aaaaaaa做受| 日本不卡中文字幕| 国产精品第四页| 日韩欧美成人激情| 欧美自拍偷拍一区| 成人av网站在线观看| 麻豆91精品91久久久的内涵| 亚洲精品第1页| 中文字幕乱码久久午夜不卡 | 日韩激情视频网站| 自拍偷拍欧美激情| 中文字幕乱码亚洲精品一区| 欧美成人精精品一区二区频| 精品视频免费在线| 一本大道久久精品懂色aⅴ | 欧美在线观看视频一区二区三区| 国产精品一区2区| 麻豆精品一区二区| 石原莉奈一区二区三区在线观看 | 国产精品久久久久久久久免费桃花| 日韩美女一区二区三区| 欧美色成人综合| 色先锋aa成人| av不卡免费在线观看| 国产精品一区二区91| 久久av资源网| 麻豆精品久久精品色综合| 亚洲第一会所有码转帖| 一级精品视频在线观看宜春院| 中文一区二区完整视频在线观看| 久久色在线观看| 2022国产精品视频| ww亚洲ww在线观看国产| ww久久中文字幕| 国产亚洲精品bt天堂精选| 26uuu色噜噜精品一区| 精品成人免费观看| 久久一区二区三区国产精品| 精品福利一二区| 26uuu成人网一区二区三区| 久久午夜国产精品| 国产色产综合色产在线视频| 久久美女艺术照精彩视频福利播放 | 欧美国产综合一区二区| 国产婷婷色一区二区三区| 久久亚洲欧美国产精品乐播| 久久久久久久久免费| 26uuu国产日韩综合| 国产人成一区二区三区影院| 中文字幕二三区不卡| 一区在线观看免费| 一区二区三区电影在线播| 亚洲影院免费观看| 五月激情六月综合| 麻豆精品在线播放| 国产精品原创巨作av| 不卡一区二区在线| 91九色02白丝porn| 91精品一区二区三区久久久久久 | 中文字幕第一区第二区| 亚洲欧美日本在线| 天天影视色香欲综合网老头| 美女视频黄 久久| 国产成人自拍网| 91影视在线播放| 欧美色老头old∨ideo| 亚洲精品老司机| 婷婷久久综合九色国产成人| 麻豆91在线播放| 9i在线看片成人免费| 欧美日韩一本到| 久久夜色精品国产噜噜av| 自拍偷拍亚洲综合| 美女高潮久久久| 99视频一区二区三区| 欧美精品日日鲁夜夜添| 久久色在线观看| 亚洲一区二区高清| 国产乱子伦视频一区二区三区| 91视频精品在这里| 日韩亚洲欧美在线观看| 国产精品久久久久久久久搜平片| 亚洲123区在线观看| 国产精品一区二区三区网站| 欧美亚洲日本国产| 国产午夜一区二区三区| 香蕉av福利精品导航| 国产v综合v亚洲欧| 在线电影国产精品| 亚洲欧美自拍偷拍色图| 裸体歌舞表演一区二区| 一本色道久久综合亚洲91 | 精品久久五月天| 亚洲女性喷水在线观看一区| 久久国产三级精品| 欧美午夜精品理论片a级按摩| 欧美成人一区二区三区在线观看| 亚洲三级电影网站| 国产伦精品一区二区三区免费迷| 在线视频欧美精品| 国产欧美视频在线观看| 日韩—二三区免费观看av| 91论坛在线播放| 国产午夜精品福利| 欧美aaaaa成人免费观看视频| 色猫猫国产区一区二在线视频| 久久―日本道色综合久久| 日韩二区三区在线观看| 在线一区二区视频| 国产精品久久久久久久久搜平片| 精品亚洲国产成人av制服丝袜| 精品视频999| 一区二区欧美视频| 91色综合久久久久婷婷| 国产三级久久久| 久久精品99国产精品| 9191成人精品久久| 一区二区成人在线视频| 97超碰欧美中文字幕| 久久亚洲影视婷婷| 蜜桃精品视频在线| 91极品美女在线| 国产精一品亚洲二区在线视频| 日本韩国欧美在线| 色综合中文字幕| 国产网站一区二区| 国产一区欧美二区| 日韩一级大片在线观看| 日本成人超碰在线观看| 91精品国产综合久久精品麻豆| 亚洲午夜久久久| 欧美色图在线观看| 亚洲mv在线观看| 欧美男男青年gay1069videost | 丁香激情综合五月| 国产视频一区在线播放| 久久影音资源网| aaa欧美色吧激情视频| 免费在线成人网| 亚洲成人777| 精品国产免费人成电影在线观看四季 | 婷婷综合在线观看| 91麻豆精品秘密| 亚洲美腿欧美偷拍| 91老司机福利 在线| 国产精品色噜噜| 99久久er热在这里只有精品66| 亚洲婷婷国产精品电影人久久| 2017欧美狠狠色| 粉嫩欧美一区二区三区高清影视| 久久精品夜色噜噜亚洲a∨| 国产美女视频91| 国产精品久久网站| 91麻豆免费看片| 午夜a成v人精品| 2024国产精品| 99久久久国产精品免费蜜臀| 亚洲精品福利视频网站| 91精品欧美综合在线观看最新 | 国产欧美久久久精品影院| 99久久久久久| 视频一区视频二区在线观看| 精品日韩99亚洲| av电影天堂一区二区在线 | 国产乱码精品1区2区3区| 中文一区二区在线观看| 欧美亚洲动漫制服丝袜| 日本不卡123| 中文字幕av一区二区三区免费看| 色狠狠色噜噜噜综合网| 免费成人小视频| 中文字幕精品一区| 欧美日韩日本视频| 国产福利一区二区三区视频在线 | 天天综合日日夜夜精品| 2017欧美狠狠色| 在线视频国内自拍亚洲视频| 奇米影视一区二区三区| 国产精品久久久久久久久免费丝袜 | 国产精品亚洲一区二区三区妖精| 最近日韩中文字幕| 日韩西西人体444www| 国v精品久久久网| 99久久精品国产毛片| 日韩精品成人一区二区三区| 日本一区二区久久| 69久久夜色精品国产69蝌蚪网| 成人动漫一区二区在线| 玖玖九九国产精品| 依依成人综合视频| 久久久久久久久久久电影| 欧美在线观看一二区| 国产福利一区二区三区视频在线| 偷拍与自拍一区| 亚洲欧美另类久久久精品| 久久品道一品道久久精品| 欧美精品 国产精品| 91网站最新地址|