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

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

?? port.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? C
字號(hào):
/* 
	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.
	***************************************************************************
*/

/* GCC/HCS12 port by Jefferson L Smith, 2005 */

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

/* Port includes */
#include <sys/ports_def.h>

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


/*
 * Configure a timer to generate the RTOS tick at the frequency specified 
 * within FreeRTOSConfig.h.
 */
static void prvSetupTimerInterrupt( void );

/* NOTE: Interrupt service routines must be in non-banked memory - as does the
scheduler startup function. */
#define ATTR_NEAR	__attribute__((near))

/* Manual context switch function.  This is the SWI ISR. */
// __attribute__((interrupt))
void ATTR_NEAR vPortYield( void );

/* Tick context switch function.  This is the timer ISR. */
// __attribute__((interrupt))
void ATTR_NEAR vPortTickInterrupt( void );

/* Function in non-banked memory which actually switches to first task. */
portBASE_TYPE ATTR_NEAR xStartSchedulerNear( void );

/* Calls to portENTER_CRITICAL() can be nested.  When they are nested the 
critical section should not be left (i.e. interrupts should not be re-enabled)
until the nesting depth reaches 0.  This variable simply tracks the nesting 
depth.  Each task maintains it's own critical nesting depth variable so 
uxCriticalNesting is saved and restored from the task stack during a context
switch. */
volatile unsigned portBASE_TYPE uxCriticalNesting = 0x80;  // un-initialized

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

/* 
 * See header file for description. 
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{


	/* Setup the initial stack of the task.  The stack is set exactly as 
	expected by the portRESTORE_CONTEXT() macro.  In this case the stack as
	expected by the HCS12 RTI instruction. */


	/* The address of the task function is placed in the stack byte at a time. */
	*pxTopOfStack   = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pxCode) ) + 1 );
	*--pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pxCode) ) + 0 );

	/* Next are all the registers that form part of the task context. */

	/* Y register */
	*--pxTopOfStack = ( portSTACK_TYPE ) 0xff;
	*--pxTopOfStack = ( portSTACK_TYPE ) 0xee;

	/* X register */
	*--pxTopOfStack = ( portSTACK_TYPE ) 0xdd;
	*--pxTopOfStack = ( portSTACK_TYPE ) 0xcc;
 
	/* A register contains parameter high byte. */
	*--pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pvParameters) ) + 0 );

	/* B register contains parameter low byte. */
	*--pxTopOfStack = ( portSTACK_TYPE ) *( ((portSTACK_TYPE *) (&pvParameters) ) + 1 );

	/* CCR: Note that when the task starts interrupts will be enabled since
	"I" bit of CCR is cleared */
	*--pxTopOfStack = ( portSTACK_TYPE ) 0x80;		// keeps Stop disabled (MCU default)
	
	/* tmp softregs used by GCC. Values right now don't	matter. */
	__asm("\n\
		movw _.frame, 2,-%0							\n\
		movw _.tmp, 2,-%0							\n\
		movw _.z, 2,-%0								\n\
		movw _.xy, 2,-%0							\n\
		;movw _.d2, 2,-%0							\n\
		;movw _.d1, 2,-%0							\n\
	": "=A"(pxTopOfStack) : "0"(pxTopOfStack) );

	#ifdef BANKED_MODEL
		/* The page of the task. */
		*--pxTopOfStack = 0x30;      // can only directly start in PPAGE 0x30
	#endif
	
	/* The critical nesting depth is initialised with 0 (meaning not in
	a critical section). */
	*--pxTopOfStack = ( portSTACK_TYPE ) 0x00;


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

void vPortEndScheduler( void )
{
	/* It is unlikely that the HCS12 port will get stopped. */
}
/*-----------------------------------------------------------*/

static void prvSetupTimerInterrupt( void )
{
	/* Enable hardware RTI timer */
	/* Ignores configTICK_RATE_HZ */
	RTICTL = 0x50;			// 16 MHz xtal: 976.56 Hz, 1024mS 
	CRGINT |= 0x80;			// RTIE
}
/*-----------------------------------------------------------*/

portBASE_TYPE xPortStartScheduler( void )
{
	/* xPortStartScheduler() does not start the scheduler directly because 
	the header file containing the xPortStartScheduler() prototype is part 
	of the common kernel code, and therefore cannot use the CODE_SEG pragma. 
	Instead it simply calls the locally defined xNearStartScheduler() - 
	which does use the CODE_SEG pragma. */

	short register d;
	__asm ("jmp  xStartSchedulerNear		; will never return": "=d"(d));
	return d;
}
/*-----------------------------------------------------------*/

portBASE_TYPE xStartSchedulerNear( void )
{
	/* Configure the timer that will generate the RTOS tick.  Interrupts are
	disabled when this function is called. */
	prvSetupTimerInterrupt();

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

	portISR_TAIL();

	/* Should not get here! */
	return pdFALSE;
}
/*-----------------------------------------------------------*/

/*
 * Context switch functions.  These are interrupt service routines.
 */

/*
 * Manual context switch forced by calling portYIELD().  This is the SWI
 * handler.
 */
void vPortYield( void )
{
	portISR_HEAD();
	/* NOTE: This is the trap routine (swi) although not defined as a trap.
	   It will fill the stack the same way as an ISR in order to mix preemtion
	   and cooperative yield. */

	portSAVE_CONTEXT();
	vTaskSwitchContext();
	portRESTORE_CONTEXT();

	portISR_TAIL();
}
/*-----------------------------------------------------------*/

/*
 * RTOS tick interrupt service routine.  If the cooperative scheduler is 
 * being used then this simply increments the tick count.  If the 
 * preemptive scheduler is being used a context switch can occur.
 */
void vPortTickInterrupt( void )
{
	portISR_HEAD();

	/* Clear tick timer flag */
	CRGFLG = 0x80;

	#if configUSE_PREEMPTION == 1
	{
		/* A context switch might happen so save the context. */
		portSAVE_CONTEXT();

		/* Increment the tick ... */
		vTaskIncrementTick();

		/* ... then see if the new tick value has necessitated a
		context switch. */
		vTaskSwitchContext();

		/* Restore the context of a task - which may be a different task
		to that interrupted. */
		portRESTORE_CONTEXT();
	}
	#else
	{
		vTaskIncrementTick();
	}
	#endif

	portISR_TAIL();
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃av一区二区三区电影| 久久精品国产亚洲一区二区三区| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲视频1区2区| 91精品视频网| 一本一本久久a久久精品综合麻豆| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国内精品伊人久久久久av影院| 亚洲女女做受ⅹxx高潮| 久久久久久久久99精品| 欧美日韩高清影院| 91丨九色porny丨蝌蚪| 精品在线一区二区三区| 亚欧色一区w666天堂| 亚洲国产成人私人影院tom | 久久久蜜臀国产一区二区| 精品视频一区三区九区| 94-欧美-setu| 成人爱爱电影网址| 国产精品一区二区三区四区| 日日摸夜夜添夜夜添国产精品| 亚洲免费观看高清在线观看| 欧美高清在线精品一区| 久久久噜噜噜久噜久久综合| 日韩女优毛片在线| 91精品国产丝袜白色高跟鞋| 欧美日精品一区视频| 一本大道av伊人久久综合| av男人天堂一区| 懂色一区二区三区免费观看| 精品无码三级在线观看视频| 麻豆精品一二三| 日本不卡在线视频| 日本欧美久久久久免费播放网| 午夜婷婷国产麻豆精品| 亚洲大型综合色站| 亚洲第一综合色| 亚洲成人福利片| 亚洲尤物视频在线| 亚洲综合自拍偷拍| 亚洲国产中文字幕在线视频综合| 亚洲综合色视频| 亚洲国产综合色| 日韩电影在线观看电影| 奇米影视一区二区三区| 精品综合久久久久久8888| 精久久久久久久久久久| 国产激情一区二区三区| 成人性色生活片| 色综合天天综合网天天看片| 色综合久久久久| 欧美精品日日鲁夜夜添| 日韩一区二区三区观看| 2020国产精品自拍| 国产精品久久网站| 亚洲精品视频在线看| 午夜久久电影网| 久久超级碰视频| 国产乱国产乱300精品| k8久久久一区二区三区| 91福利视频在线| 欧美一级精品在线| 国产日韩精品一区二区浪潮av| 中文字幕日本乱码精品影院| 亚洲精品乱码久久久久久日本蜜臀 | 欧美sm美女调教| 国产欧美综合在线| 综合亚洲深深色噜噜狠狠网站| 亚洲一区av在线| 激情综合色综合久久| av中文字幕亚洲| 91 com成人网| 国产亚洲欧洲997久久综合| 国产精品久久久久国产精品日日 | 日韩伦理av电影| 亚洲sss视频在线视频| 韩国女主播一区二区三区| av一区二区三区黑人| 欧美福利视频一区| 久久精品亚洲麻豆av一区二区 | 国产精品久久久久久妇女6080| 洋洋成人永久网站入口| 国产综合色视频| 91老师片黄在线观看| 欧美一区二区三区四区五区| 亚洲国产精品成人久久综合一区| 亚洲bt欧美bt精品| 国产v综合v亚洲欧| 9191久久久久久久久久久| 国产精品三级在线观看| 日韩国产成人精品| 91丨九色porny丨蝌蚪| 精品欧美久久久| 亚洲一区二区欧美日韩| 国产成人99久久亚洲综合精品| 欧美三级乱人伦电影| 国产精品久久久久久一区二区三区| 性做久久久久久免费观看欧美| 成人av在线网| 日韩欧美成人激情| 亚洲成人一区二区在线观看| 成人免费观看男女羞羞视频| 日韩欧美国产wwwww| 一区二区高清免费观看影视大全 | 最新成人av在线| 国产一级精品在线| 欧美精品日韩一本| 一区二区三区四区在线播放| 国产精品一区二区果冻传媒| 91精品国产欧美一区二区18| 亚洲精品第1页| 波多野结衣在线aⅴ中文字幕不卡| 日韩精品自拍偷拍| 午夜视频久久久久久| 在线看国产日韩| 综合网在线视频| a级精品国产片在线观看| 久久久www成人免费毛片麻豆| 捆绑紧缚一区二区三区视频| 欧美日韩成人一区| 亚洲成人一区在线| 欧美在线播放高清精品| 亚洲乱码中文字幕| 99国产精品久久久久久久久久| 国产色爱av资源综合区| 国产呦精品一区二区三区网站| 欧美一区二区视频观看视频| 亚洲成人午夜影院| 欧美日韩国产影片| 亚洲123区在线观看| 欧美日本一区二区三区| 亚洲高清在线精品| 欧美美女激情18p| 婷婷中文字幕一区三区| 欧美日韩1234| 午夜国产精品一区| 6080日韩午夜伦伦午夜伦| 高清不卡在线观看av| 欧美v亚洲v综合ⅴ国产v| 精品亚洲免费视频| 欧美变态tickle挠乳网站| 精品一区二区在线免费观看| 精品国产伦一区二区三区观看方式 | 一区视频在线播放| 成人黄色免费短视频| √…a在线天堂一区| 色婷婷精品久久二区二区蜜臀av | 国产盗摄女厕一区二区三区 | 久久综合成人精品亚洲另类欧美| 精品无人区卡一卡二卡三乱码免费卡 | 国产精品白丝在线| 91丨九色丨蝌蚪丨老版| 亚洲综合一区二区精品导航| 欧美绝品在线观看成人午夜影视| 奇米在线7777在线精品| 久久久精品日韩欧美| 99精品黄色片免费大全| 亚洲午夜久久久久久久久久久 | 亚洲国产成人91porn| 91麻豆精品国产91久久久| 久久精品国产99国产精品| 国产日韩欧美亚洲| 在线视频你懂得一区| 日本不卡免费在线视频| 久久久91精品国产一区二区精品| youjizz国产精品| 亚洲国产人成综合网站| 精品国产乱码久久久久久闺蜜| 国产成人在线视频免费播放| 亚洲精品乱码久久久久久黑人 | 亚洲乱码国产乱码精品精98午夜| 欧美日韩免费一区二区三区 | 1区2区3区国产精品| 欧美视频一区二区在线观看| 久久成人免费日本黄色| 国产精品国产三级国产有无不卡| 欧美少妇bbb| 国产一区二区免费视频| 亚洲黄色av一区| 精品国产91洋老外米糕| 色欧美日韩亚洲| 国产精品一区二区免费不卡| 亚洲一区二区三区四区在线观看| 久久影音资源网| 国产精品久久久久久久久久免费看 | 国产欧美一二三区| 欧美色综合影院| 盗摄精品av一区二区三区| 亚洲国产美女搞黄色| 欧美激情资源网| 制服丝袜中文字幕一区| 91看片淫黄大片一级在线观看| 久久精品国产精品亚洲精品| 一区二区三区四区在线播放| 久久久久久久久免费| 欧美久久高跟鞋激| 不卡av在线免费观看| 蜜臀a∨国产成人精品| 亚洲与欧洲av电影| 国产精品成人一区二区艾草|