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

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

?? port.c

?? FreeRTOSV4.1.0 安裝文件 FreeRTOS 是一個(gè)源碼公開的免費(fèi)的嵌入式實(shí)時(shí)操作系統(tǒng)
?? C
字號(hào):
/*
	FreeRTOS.org V4.1.0 - Copyright (C) 2003-2006 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.
	***************************************************************************
*/

/* 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一区二区三区免费野_久草精品视频
欧美日韩国产综合一区二区| 亚洲综合视频在线观看| 99久久精品国产毛片| 国产盗摄一区二区三区| 国内精品国产三级国产a久久| 亚洲综合小说图片| 亚洲一区二区三区四区中文字幕| 欧美videossexotv100| 亚洲无人区一区| 一本色道a无线码一区v| 亚洲动漫第一页| 日韩欧美一区二区在线视频| 久久国产婷婷国产香蕉| 国产欧美一区二区精品秋霞影院| 成人av综合在线| 夜夜夜精品看看| 91精品国产综合久久精品| 国内精品视频666| 中文字幕中文字幕在线一区 | 免费看欧美女人艹b| 精品盗摄一区二区三区| 成人污视频在线观看| 亚洲妇熟xx妇色黄| 久久综合色鬼综合色| 91浏览器在线视频| 麻豆成人91精品二区三区| 中文天堂在线一区| 欧美放荡的少妇| 国产精品羞羞答答xxdd| 亚洲国产成人av| 久久久久久久一区| 精品婷婷伊人一区三区三| 国产一级精品在线| 亚洲永久免费av| 久久精品免视看| 欧美久久高跟鞋激| 99视频在线观看一区三区| 免费人成在线不卡| 国产精品久久久久久亚洲毛片| 欧美精品日韩精品| 91在线一区二区| 精品一区二区在线观看| 一区二区三区资源| 亚洲国产精品成人久久综合一区| 欧美日韩一本到| bt7086福利一区国产| 久久99国产精品尤物| 亚洲一区二区视频在线观看| 国产午夜精品在线观看| 日韩亚洲欧美综合| 欧美亚洲一区二区在线观看| 懂色一区二区三区免费观看 | 美女在线观看视频一区二区| 亚洲欧美日韩久久精品| 久久美女高清视频| 欧美一区二区私人影院日本| 91国内精品野花午夜精品| 国产老妇另类xxxxx| 久久国产婷婷国产香蕉| 图片区小说区国产精品视频| 亚洲色图制服诱惑| 国产精品视频一二| 亚洲精品在线观看网站| 在线综合亚洲欧美在线视频| 99精品国产一区二区三区不卡| 国产一区二区伦理片| 久久精品噜噜噜成人av农村| 天天操天天综合网| 亚洲电影一级黄| 亚洲美女一区二区三区| 亚洲天堂2016| 亚洲欧洲精品成人久久奇米网| 国产午夜一区二区三区| 久久久综合网站| 久久综合狠狠综合久久激情| 日韩欧美国产麻豆| 日韩欧美三级在线| 日韩女优av电影在线观看| 日韩欧美一级二级三级久久久| 在线综合亚洲欧美在线视频| 欧美一区二区三区爱爱| 91精品国产一区二区| 欧美丰满少妇xxxxx高潮对白| 精品视频一区二区三区免费| 欧美亚洲国产bt| 欧美三级电影在线看| 欧美日韩亚洲高清一区二区| 精品视频色一区| 日韩一二三区不卡| 2024国产精品| 国产亚洲制服色| 国产精品美女久久久久久久| 国产精品乱人伦| 一区二区激情视频| 日韩福利电影在线| 韩国毛片一区二区三区| 国产99精品视频| 色哟哟一区二区| 666欧美在线视频| 久久免费精品国产久精品久久久久| 欧美国产一区在线| 亚洲一区二区在线视频| 久久免费的精品国产v∧| 麻豆精品视频在线| 丝袜美腿亚洲一区| 丁香啪啪综合成人亚洲小说 | 日韩不卡手机在线v区| 欧美激情自拍偷拍| 亚洲黄色性网站| 国产高清无密码一区二区三区| 亚洲国产中文字幕在线视频综合| 亚洲成人av福利| 国产一区在线不卡| 成人av网址在线| 欧美日韩在线观看一区二区| 日韩一级免费观看| 国产精品国产精品国产专区不片| 亚洲综合在线免费观看| 久久精品国产久精国产爱| 成人国产精品免费网站| 欧美日韩一区高清| 日本一区二区三区在线观看| 亚洲成人免费观看| 国产99久久久国产精品免费看 | 色婷婷综合久色| 欧美xxxxxxxxx| 亚洲女子a中天字幕| 免费观看在线综合色| 99久久精品费精品国产一区二区| 欧美高清你懂得| 亚洲欧美偷拍三级| 国内精品写真在线观看| 欧美日韩一区二区在线视频| 国产精品久久99| 久久99精品久久久久久| 欧美三级日韩在线| 亚洲欧洲日本在线| 国产伦理精品不卡| 欧美精品三级日韩久久| 亚洲人成亚洲人成在线观看图片| 麻豆一区二区三| 欧美日韩在线播放一区| 中文一区一区三区高中清不卡| 日韩影院免费视频| 91高清视频在线| 国产日产亚洲精品系列| 免费观看在线色综合| 欧美午夜精品免费| 亚洲欧洲国产专区| 国产一区免费电影| 欧美一区二区成人| 亚洲成人激情综合网| 一本大道久久a久久精品综合| 国产精品乱码一区二区三区软件| 国产资源在线一区| 日韩免费电影网站| 奇米色一区二区| 欧美酷刑日本凌虐凌虐| 亚洲一区二区不卡免费| 色婷婷综合久久久中文字幕| 中文字幕一区二区三区色视频| 国产成a人亚洲精品| 久久久午夜精品理论片中文字幕| 狠狠色丁香婷婷综合| 精品国产乱码久久久久久浪潮| 免费亚洲电影在线| 欧美大片一区二区| 精品一区二区三区久久久| 中文幕一区二区三区久久蜜桃| 国产一区二区在线视频| 久久影院午夜片一区| 国产在线观看免费一区| 久久九九99视频| www.日韩精品| 亚洲视频免费在线| 欧美无砖专区一中文字| 亚洲国产成人精品视频| 欧美麻豆精品久久久久久| 三级不卡在线观看| 日韩视频在线你懂得| 蜜臀av性久久久久av蜜臀妖精| 日韩欧美精品在线| 国产精品一区专区| 国产精品女主播在线观看| 97se亚洲国产综合自在线不卡| 中文字幕永久在线不卡| 色激情天天射综合网| 亚洲第一综合色| 精品久久久久久久一区二区蜜臀| 国产老妇另类xxxxx| 国产精品天干天干在线综合| 91免费看`日韩一区二区| 艳妇臀荡乳欲伦亚洲一区| 日韩三级电影网址| 国产乱人伦精品一区二区在线观看| 国产精品视频免费看| 欧美在线高清视频| 精品一区二区三区在线观看| 国产无人区一区二区三区| 日本精品视频一区二区三区|