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

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

?? 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.
	***************************************************************************
*/

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


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


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

/* When the task starts interrupts should be enabled. */
#define portINITIAL_CCR			( ( portSTACK_TYPE ) 0x00 )

/* Hardware specific constants used to generate the RTOS tick from the TPU. */
#define portCLEAR_ON_TGRA_COMPARE_MATCH ( ( unsigned portCHAR ) 0x20 )
#define portCLOCK_DIV_64				( ( unsigned portCHAR ) 0x03 )
#define portCLOCK_DIV					( ( unsigned portLONG ) 64 )
#define portTGRA_INTERRUPT_ENABLE		( ( unsigned portCHAR ) 0x01 )
#define portTIMER_CHANNEL				( ( unsigned portCHAR ) 0x02 )
#define portMSTP13						( ( unsigned portSHORT ) 0x2000 )

/*
 * Setup TPU channel one for the RTOS tick at the requested frequency.
 */
static void prvSetupTimerInterrupt( void );

/*
 * The ISR used by portYIELD(). This is installed as a trap handler.
 */
void vPortYield( void ) __attribute__ ( ( saveall, interrupt_handler ) );

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

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

	/* This requires an even address. */
	ulValue = ( unsigned portLONG ) pxTopOfStack;
	if( ulValue & 1UL )
	{
		pxTopOfStack = pxTopOfStack - 1;
	}

	/* Place a few bytes of known values on the bottom of the stack. 
	This is just useful for debugging. */
	pxTopOfStack--;
	*pxTopOfStack = 0xaa;
	pxTopOfStack--;
	*pxTopOfStack = 0xbb;
	pxTopOfStack--;
	*pxTopOfStack = 0xcc;
	pxTopOfStack--;
	*pxTopOfStack = 0xdd;

	/* The initial stack mimics an interrupt stack.  First there is the program
	counter (24 bits). */
	ulValue = ( unsigned portLONG ) pxCode;

	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );
	pxTopOfStack--;
	ulValue >>= 8UL;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );
	pxTopOfStack--;
	ulValue >>= 8UL;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );

	/* Followed by the CCR. */	
	pxTopOfStack--;
	*pxTopOfStack = portINITIAL_CCR;

	/* Next all the general purpose registers - with the parameters being passed
	in ER0.  The parameter order must match that used by the compiler when the
	"saveall" function attribute is used. */

	/* ER6 */
	pxTopOfStack--;
	*pxTopOfStack = 0x66;
	pxTopOfStack--;
	*pxTopOfStack = 0x66;
	pxTopOfStack--;
	*pxTopOfStack = 0x66;
	pxTopOfStack--;
	*pxTopOfStack = 0x66;
	
	/* ER0 */
	ulValue = ( unsigned portLONG ) pvParameters;

	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );
	pxTopOfStack--;
	ulValue >>= 8UL;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );
	pxTopOfStack--;
	ulValue >>= 8UL;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );
	pxTopOfStack--;
	ulValue >>= 8UL;
	*pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );
	
	/* ER1 */
	pxTopOfStack--;
	*pxTopOfStack = 0x11;
	pxTopOfStack--;
	*pxTopOfStack = 0x11;
	pxTopOfStack--;
	*pxTopOfStack = 0x11;
	pxTopOfStack--;
	*pxTopOfStack = 0x11;

	/* ER2 */
	pxTopOfStack--;
	*pxTopOfStack = 0x22;
	pxTopOfStack--;
	*pxTopOfStack = 0x22;
	pxTopOfStack--;
	*pxTopOfStack = 0x22;
	pxTopOfStack--;
	*pxTopOfStack = 0x22;

	/* ER3 */
	pxTopOfStack--;
	*pxTopOfStack = 0x33;
	pxTopOfStack--;
	*pxTopOfStack = 0x33;
	pxTopOfStack--;
	*pxTopOfStack = 0x33;
	pxTopOfStack--;
	*pxTopOfStack = 0x33;

	/* ER4 */
	pxTopOfStack--;
	*pxTopOfStack = 0x44;
	pxTopOfStack--;
	*pxTopOfStack = 0x44;
	pxTopOfStack--;
	*pxTopOfStack = 0x44;
	pxTopOfStack--;
	*pxTopOfStack = 0x44;

	/* ER5 */
	pxTopOfStack--;
	*pxTopOfStack = 0x55;
	pxTopOfStack--;
	*pxTopOfStack = 0x55;
	pxTopOfStack--;
	*pxTopOfStack = 0x55;
	pxTopOfStack--;
	*pxTopOfStack = 0x55;

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

portBASE_TYPE xPortStartScheduler( void )
{
extern void * pxCurrentTCB;

	/* Setup the hardware to generate the tick. */
	prvSetupTimerInterrupt();

	/* Restore the context of the first task that is going to run.  This
	mirrors the function epilogue code generated by the compiler when the
	"saveall" function attribute is used. */
	asm volatile ( 
					"MOV.L		@_pxCurrentTCB, ER6			\n\t"
					"MOV.L		@ER6, ER7					\n\t"
					"LDM.L     	@SP+, (ER4-ER5)				\n\t"
					"LDM.L     	@SP+, (ER0-ER3)				\n\t"
					"MOV.L     	@ER7+, ER6					\n\t"
					"RTE									\n\t"
				);

	( void ) pxCurrentTCB;

	/* Should not get here. */
	return pdTRUE;
}
/*-----------------------------------------------------------*/

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

/*
 * Manual context switch.  This is a trap handler.  The "saveall" function
 * attribute is used so the context is saved by the compiler prologue.  All
 * we have to do is save the stack pointer.
 */
void vPortYield( void )
{
	portSAVE_STACK_POINTER();
		vTaskSwitchContext();
	portRESTORE_STACK_POINTER();
}
/*-----------------------------------------------------------*/

/* 
 * The interrupt handler installed for the RTOS tick depends on whether the 
 * preemptive or cooperative scheduler is being used. 
 */
#if( configUSE_PREEMPTION == 1 )

	/* 
	 * The preemptive scheduler is used so the ISR calls vTaskSwitchContext().
	 * The function prologue saves the context so all we have to do is save
	 * the stack pointer.
	 */
	void vTickISR( void ) __attribute__ ( ( saveall, interrupt_handler ) );
	void vTickISR( void )
	{
		portSAVE_STACK_POINTER();
		
		vTaskIncrementTick();
		vTaskSwitchContext();

		/* Clear the interrupt. */
		TSR1 &= ~0x01;

		portRESTORE_STACK_POINTER();
	}

#else

	/*
	 * The cooperative scheduler is being used so all we have to do is 
	 * periodically increment the tick.  This can just be a normal ISR and
	 * the "saveall" attribute is not required.
	 */
	void vTickISR( void ) __attribute__ ( ( interrupt_handler ) );
	void vTickISR( void )
	{
		vTaskIncrementTick();

		/* Clear the interrupt. */
		TSR1 &= ~0x01;
	}

#endif
/*-----------------------------------------------------------*/

/*
 * Setup timer 1 compare match to generate a tick interrupt.
 */
static void prvSetupTimerInterrupt( void )
{
const unsigned portLONG ulCompareMatch = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) / portCLOCK_DIV;

	/* Turn the module on. */
	MSTPCR &= ~portMSTP13;

	/* Configure timer 1. */
	TCR1 = portCLEAR_ON_TGRA_COMPARE_MATCH | portCLOCK_DIV_64;

	/* Configure the compare match value for a tick of configTICK_RATE_HZ. */
	TGR1A = ulCompareMatch;

	/* Start the timer and enable the interrupt - we can do this here as 
	interrupts are globally disabled when this function is called. */
	TIER1 |= portTGRA_INTERRUPT_ENABLE;
	TSTR |= portTIMER_CHANNEL;
}
/*-----------------------------------------------------------*/



?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜狠狠色综合欧洲selulu| 欧美变态tickle挠乳网站| 亚洲一区在线看| 欧美怡红院视频| 日韩av中文在线观看| 欧美成人免费网站| 国产美女视频91| 中文幕一区二区三区久久蜜桃| av在线不卡免费看| 亚洲午夜精品在线| 欧美xingq一区二区| 成人综合婷婷国产精品久久蜜臀| 亚洲欧美日韩在线| 911精品国产一区二区在线| 热久久久久久久| 久久久久久久久蜜桃| 99re66热这里只有精品3直播 | 国产精品免费视频网站| 99精品国产视频| 亚洲不卡在线观看| 2021国产精品久久精品| 99久久婷婷国产综合精品电影 | 91香蕉视频mp4| 亚洲国产精品久久久久婷婷884 | 色猫猫国产区一区二在线视频| 亚洲va中文字幕| 精品久久久三级丝袜| 成人免费观看男女羞羞视频| 一个色综合av| 日韩欧美电影一区| 99re在线精品| 蜜臀av一区二区在线免费观看 | 中文一区二区在线观看| 色狠狠色狠狠综合| 免费看日韩a级影片| 国产精品免费av| 欧美日韩电影一区| 国产凹凸在线观看一区二区| 亚洲一区在线观看视频| www一区二区| 夜夜嗨av一区二区三区中文字幕| 欧美一区二区视频网站| 成人av资源在线| 天天av天天翘天天综合网色鬼国产| 久久综合久久久久88| 色就色 综合激情| 久久99精品久久久| 一区二区激情小说| 久久欧美一区二区| 欧美日韩你懂得| 丁香五精品蜜臀久久久久99网站| 亚洲6080在线| 国产精品乱码一区二三区小蝌蚪| 制服丝袜av成人在线看| 99久久伊人久久99| 久久精品国产亚洲一区二区三区| 亚洲三级在线观看| 精品国产乱码久久久久久夜甘婷婷 | 日韩欧美www| 99国产精品国产精品毛片| 美日韩一区二区| 一区二区三区中文字幕在线观看| 久久综合中文字幕| 欧美日韩激情在线| 色综合久久久久综合| 国产精品1区二区.| 日本va欧美va瓶| 亚洲一区中文日韩| 国产精品每日更新| 久久天天做天天爱综合色| 欧美日韩国产a| 91在线精品秘密一区二区| 国内精品伊人久久久久影院对白| 亚洲777理论| 亚洲精品成人少妇| 18涩涩午夜精品.www| 久久久久久久久久看片| 日韩欧美一区在线| 欧美美女一区二区在线观看| 91亚洲精华国产精华精华液| 国产成人免费高清| 久久国产人妖系列| 日韩在线一区二区| 欧美性猛交xxxxxxxx| jlzzjlzz亚洲女人18| 国产精品伊人色| 理论片日本一区| 日本欧美肥老太交大片| 亚洲电影一区二区| 一卡二卡欧美日韩| 亚洲精品视频在线观看网站| 国产精品污www在线观看| 久久午夜色播影院免费高清| 日韩免费看网站| 日韩欧美国产系列| 欧美一区二区成人6969| 欧美另类z0zxhd电影| 欧美日韩视频在线观看一区二区三区| 一本色道久久综合亚洲精品按摩 | 成人一区二区在线观看| 国产综合色产在线精品| 看电影不卡的网站| 美女视频一区二区三区| 美国av一区二区| 美脚の诱脚舐め脚责91 | 亚洲精品国产无天堂网2021| 中文字幕一区在线观看| 中文字幕中文乱码欧美一区二区| 欧美激情一区二区在线| 中文字幕久久午夜不卡| 中文字幕不卡在线| 国产精品欧美精品| 中文字幕一区二区三区蜜月| 最新中文字幕一区二区三区| 亚洲欧洲日产国产综合网| 18涩涩午夜精品.www| 尤物在线观看一区| 亚洲自拍另类综合| 午夜精品一区二区三区免费视频| 亚洲gay无套男同| 男人的天堂亚洲一区| 久久97超碰色| 国产精品香蕉一区二区三区| 成人爽a毛片一区二区免费| 成人aa视频在线观看| 97久久精品人人做人人爽| 91国偷自产一区二区三区观看| 欧美吻胸吃奶大尺度电影| 在线播放日韩导航| 精品人伦一区二区色婷婷| 久久精品无码一区二区三区| 成人精品视频一区二区三区尤物| 99视频超级精品| 欧美色图12p| 欧美一区二区三区免费在线看| 日韩欧美国产三级| 国产人成一区二区三区影院| 中文字幕一区二区三区四区| 亚洲国产精品一区二区尤物区| 日韩国产精品大片| 国产在线精品一区在线观看麻豆| 大美女一区二区三区| 色婷婷狠狠综合| 91精品国产综合久久久久久久| 26uuu久久天堂性欧美| 国产精品女主播av| 亚洲成人动漫在线观看| 看片的网站亚洲| 成年人国产精品| 欧美日韩久久一区二区| 精品动漫一区二区三区在线观看| 国产网站一区二区| 一区二区在线免费观看| 美女视频一区二区| 波多野结衣精品在线| 欧美日韩高清影院| 久久久久88色偷偷免费| 一区二区三区在线视频观看| 麻豆精品久久久| 最新日韩av在线| 免费欧美日韩国产三级电影| www.激情成人| 欧美精品 日韩| 国产欧美日韩麻豆91| 亚洲妇熟xx妇色黄| 国产精品456露脸| 欧美日韩一区二区三区四区| 久久久亚洲精品一区二区三区| 亚洲免费伊人电影| 久久精品国产一区二区| av在线播放一区二区三区| 欧美一区二区三区免费观看视频| 国产精品久久久久久久久免费丝袜| 天天av天天翘天天综合网 | 国产精品一卡二卡在线观看| 色狠狠色狠狠综合| 久久综合久久鬼色| 亚洲国产一区二区视频| 国产精品69毛片高清亚洲| 欧美日韩视频在线一区二区| 国产欧美一区二区精品性色| 无码av免费一区二区三区试看| 国产高清亚洲一区| 欧美电影在哪看比较好| 国产精品久久福利| 精品一区免费av| 亚洲国产成人tv| 国产精品99久久久久| 欧美另类变人与禽xxxxx| 亚洲国产成人私人影院tom| 奇米一区二区三区| 色天天综合色天天久久| 久久久久久久综合| 人人狠狠综合久久亚洲| 91国产成人在线| 中文字幕不卡在线观看| 久久精品免费看| 欧美日韩性生活| 亚洲视频 欧洲视频| 国产激情视频一区二区三区欧美|