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

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

?? port.c

?? FreeRtos Source code Version 4.04
?? C
字號:
/* 
	FreeRTOS.org V4.0.4 - Copyright (C) 2003 - 2005 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.
	***************************************************************************
*/

/* 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();
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品国产毛片| 婷婷久久综合九色国产成人 | 亚洲制服丝袜在线| 蜜桃一区二区三区在线观看| 国产aⅴ综合色| 欧美日韩情趣电影| 中文字幕乱码日本亚洲一区二区| 亚洲成人自拍网| 成人精品鲁一区一区二区| 51午夜精品国产| 中文字幕日本不卡| 国产老女人精品毛片久久| 欧美日韩精品综合在线| 日本一区二区动态图| 麻豆精品国产传媒mv男同| 色成年激情久久综合| 亚洲国产精品成人久久综合一区| 日韩精品久久理论片| 91成人网在线| 《视频一区视频二区| 激情欧美一区二区| 日韩视频中午一区| 日韩精品成人一区二区在线| 色综合久久久久久久久| 中文字幕在线免费不卡| 国产精品一区二区三区四区| 日韩欧美一区二区不卡| 午夜久久久久久久久| 在线免费精品视频| 亚洲精品精品亚洲| a4yy欧美一区二区三区| 国产人成亚洲第一网站在线播放| 激情综合网天天干| 欧美不卡一二三| 久久国产综合精品| 久久综合网色—综合色88| 蜜臀久久久99精品久久久久久| 777亚洲妇女| 日韩经典一区二区| 欧美一级高清片在线观看| 免费视频最近日韩| 日韩欧美123| 国内一区二区在线| 久久久国产精品麻豆| 国产乱码精品一区二区三 | 国产精品99久| 久久综合五月天婷婷伊人| 久久精品99国产精品| 久久久精品tv| 成人永久aaa| 亚洲精品国产无套在线观| 一本一道综合狠狠老| 亚洲一区在线电影| 3atv一区二区三区| 国产美女精品人人做人人爽 | 欧美精品一区二区蜜臀亚洲| 国产主播一区二区三区| 久久精品一区二区三区不卡牛牛| 成人永久aaa| 亚洲国产精品久久久男人的天堂| 欧美日韩电影在线播放| 麻豆国产一区二区| 中文av一区二区| 欧美在线高清视频| 久久99精品国产麻豆不卡| 国产亚洲成av人在线观看导航| 成人激情文学综合网| 亚洲香蕉伊在人在线观| 日韩你懂的电影在线观看| 成人激情免费电影网址| 亚洲国产精品一区二区www在线 | 亚洲女人的天堂| 777色狠狠一区二区三区| 国产精品白丝jk黑袜喷水| 一区二区三区精品久久久| 日韩欧美一区中文| 91年精品国产| 黑人巨大精品欧美黑白配亚洲| 国产精品国产a级| 欧美一区日韩一区| 成人18视频日本| 免费视频一区二区| 亚洲丝袜制服诱惑| 欧美精品一区二区三区久久久| 99re成人精品视频| 久久成人羞羞网站| 一区二区三区中文在线| 久久精品一区二区三区四区| 欧美一a一片一级一片| 国产精品综合久久| 五月天一区二区| 亚洲欧洲日韩综合一区二区| 91麻豆国产精品久久| 色婷婷国产精品| 图片区小说区国产精品视频| 久久精品视频在线看| 欧美日韩精品电影| av不卡在线观看| 国精产品一区一区三区mba视频| 国产精品自在在线| 久久精品国产99国产| 一区二区三区美女| 亚洲欧美日韩中文字幕一区二区三区 | 91官网在线观看| 成人午夜激情在线| 国产精品综合视频| 久88久久88久久久| 天天操天天色综合| 亚洲成精国产精品女| 中文字幕一区在线| 国产精品三级视频| 国产欧美一区二区精品性色| 精品久久久久久最新网址| 欧美一区二区三区小说| 91精品国产91久久久久久一区二区 | 日韩伦理免费电影| 国产精品久久精品日日| 国产日韩成人精品| 久久青草国产手机看片福利盒子| 日韩欧美专区在线| 欧美α欧美αv大片| 日韩欧美资源站| 欧美精品一区二区三区久久久| 制服视频三区第一页精品| 欧美久久久久久久久中文字幕| 欧美性大战久久久| 在线播放欧美女士性生活| 欧美电影一区二区| 日韩免费一区二区| 久久色在线观看| 国产精品麻豆99久久久久久| 中文字幕免费不卡在线| 国产精品乱子久久久久| 亚洲天堂a在线| 亚洲永久免费av| 日本va欧美va瓶| 国内精品免费**视频| 国产精品一区在线| 91香蕉视频mp4| 欧美性大战久久久久久久蜜臀| 欧美日产国产精品| 久久亚洲一区二区三区明星换脸| 久久久久亚洲蜜桃| 亚洲精品视频观看| 日本成人中文字幕在线视频| 国产永久精品大片wwwapp| 高清成人在线观看| 在线观看视频一区二区 | 这里只有精品免费| 26uuu欧美| 亚洲视频电影在线| 午夜成人免费视频| 国产宾馆实践打屁股91| 色哟哟精品一区| 亚洲天堂2014| 免费成人美女在线观看| 成人精品一区二区三区四区 | 国产精品污www在线观看| 亚洲摸摸操操av| 久久国产免费看| 日本久久精品电影| 精品成人私密视频| 亚洲一区在线观看免费观看电影高清 | 亚洲成人av电影在线| 国产一区二区三区高清播放| 一本久道久久综合中文字幕| 欧美va在线播放| 亚洲一二三区不卡| 丰满放荡岳乱妇91ww| 欧美丰满嫩嫩电影| 亚洲色图都市小说| 国产自产视频一区二区三区| 欧美午夜一区二区三区免费大片| 精品久久久久一区| 五月天激情小说综合| 成人免费毛片app| 日韩三区在线观看| 亚洲国产精品一区二区尤物区| 丁香婷婷综合五月| 欧美www视频| 日日骚欧美日韩| 色素色在线综合| 国产精品色眯眯| 国产精品一区二区在线观看网站| 欧美男生操女生| 亚洲影院理伦片| 91免费在线视频观看| 国产精品你懂的在线| 精东粉嫩av免费一区二区三区| 欧美性xxxxxx少妇| 亚洲黄色片在线观看| 波波电影院一区二区三区| 精品捆绑美女sm三区| 日韩精品亚洲一区二区三区免费| 欧美亚日韩国产aⅴ精品中极品| 中文字幕亚洲电影| 99久久精品久久久久久清纯| 欧美极品xxx| 国产成人av电影免费在线观看| 欧美大片拔萝卜|