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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? port.c

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

/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for the ST STR71x ARM7 
 * port.
 *----------------------------------------------------------*/

/* Library includes. */
#include "wdg.h"
#include "eic.h"

/* Standard includes. */
#include <stdlib.h>

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

/* Constants required to setup the initial stack. */
#define portINITIAL_SPSR				( ( portSTACK_TYPE ) 0x3f ) /* System mode, THUMB mode, interrupts enabled. */
#define portINSTRUCTION_SIZE			( ( portSTACK_TYPE ) 4 )

/* Constants required to handle critical sections. */
#define portNO_CRITICAL_NESTING 		( ( unsigned portLONG ) 0 )

#define portMICROS_PER_SECOND 1000000

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

/* Setup the watchdog to generate the tick interrupts. */
static void prvSetupTimerInterrupt( void );

/* ulCriticalNesting will get set to zero when the first task starts.  It
cannot be initialised to 0 as this will cause interrupts to be enabled
during the kernel initialisation process. */
unsigned portLONG ulCriticalNesting = ( unsigned portLONG ) 9999;

/* Tick interrupt routines for cooperative and preemptive operation 
respectively.  The preemptive version is not defined as __irq as it is called
from an asm wrapper function. */
__arm __irq void vPortNonPreemptiveTick( void );
void vPortPreemptiveTick( void );

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

/*
 * Initialise the stack of a task to look exactly as if a call to
 * portSAVE_CONTEXT had been called.
 *
 * See header file for description.
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{
portSTACK_TYPE *pxOriginalTOS;

	pxOriginalTOS = pxTopOfStack;

	/* Setup the initial stack of the task.  The stack is set exactly as
	expected by the portRESTORE_CONTEXT() macro. */

	/* First on the stack is the return address - which in this case is the
	start of the task.  The offset is added to make the return address appear
	as it would within an IRQ ISR. */
	*pxTopOfStack = ( portSTACK_TYPE ) pxCode + portINSTRUCTION_SIZE;		
	pxTopOfStack--;

	*pxTopOfStack = ( portSTACK_TYPE ) 0xaaaaaaaa;	/* R14 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) pxOriginalTOS; /* Stack used when task starts goes in R13. */
	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) 0x12121212;	/* R12 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x11111111;	/* R11 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x10101010;	/* R10 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x09090909;	/* R9 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x08080808;	/* R8 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x07070707;	/* R7 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x06060606;	/* R6 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x05050505;	/* R5 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x04040404;	/* R4 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x03030303;	/* R3 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x02020202;	/* R2 */
	pxTopOfStack--;	
	*pxTopOfStack = ( portSTACK_TYPE ) 0x01010101;	/* R1 */
	pxTopOfStack--;	

	/* When the task starts is will expect to find the function parameter in
	R0. */
	*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R0 */
	pxTopOfStack--;

	/* The status register is set for system mode, with interrupts enabled. */
	*pxTopOfStack = ( portSTACK_TYPE ) portINITIAL_SPSR;
	pxTopOfStack--;

	/* Interrupt flags cannot always be stored on the stack and will
	instead be stored in a variable, which is then saved as part of the
	tasks context. */
	*pxTopOfStack = portNO_CRITICAL_NESTING;

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

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

	/* Start the timer that generates the tick ISR.  Interrupts are disabled
	here already. */
	prvSetupTimerInterrupt();

	/* Start the first task. */
	vPortStartFirstTask();	

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

void vPortEndScheduler( void )
{
	/* It is unlikely that the ARM port will require this function as there
	is nothing to return to.  */
}
/*-----------------------------------------------------------*/

/* The cooperative scheduler requires a normal IRQ service routine to
simply increment the system tick. */
__arm __irq void vPortNonPreemptiveTick( void )
{
	/* Increment the tick count - which may wake some tasks but as the
	preemptive scheduler is not being used any woken task is not given
	processor time no matter what its priority. */
	vTaskIncrementTick();

	/* Clear the interrupt in the watchdog and EIC. */
	WDG->SR = 0x0000;
	portCLEAR_EIC();		
}
/*-----------------------------------------------------------*/

/* This function is called from an asm wrapper, so does not require the __irq
keyword. */
void vPortPreemptiveTick( void )
{
	/* Increment the tick counter. */
	vTaskIncrementTick();

	/* The new tick value might unblock a task.  Ensure the highest task that
	is ready to execute is the task that will execute when the tick ISR 
	exits. */
	vTaskSwitchContext();

	/* Clear the interrupt in the watchdog and EIC. */
	WDG->SR = 0x0000;
	portCLEAR_EIC();			
}
/*-----------------------------------------------------------*/

static void prvSetupTimerInterrupt( void )
{
	/* Set the watchdog up to generate a periodic tick. */
	WDG_ECITConfig( DISABLE );
	WDG_CntOnOffConfig( DISABLE );
	WDG_PeriodValueConfig( portMICROS_PER_SECOND / configTICK_RATE_HZ );

	/* Setup the tick interrupt in the EIC. */
	EIC_IRQChannelPriorityConfig( WDG_IRQChannel, 1 );
	EIC_IRQChannelConfig( WDG_IRQChannel, ENABLE );
	EIC_IRQConfig( ENABLE );
	WDG_ECITConfig( ENABLE );

	/* Start the timer - interrupts are actually disabled at this point so
	it is safe to do this here. */
	WDG_CntOnOffConfig( ENABLE );
}
/*-----------------------------------------------------------*/

__arm __interwork void vPortEnterCritical( void )
{
	/* Disable interrupts first! */
	__disable_interrupt();

	/* Now interrupts are disabled ulCriticalNesting can be accessed
	directly.  Increment ulCriticalNesting to keep a count of how many times
	portENTER_CRITICAL() has been called. */
	ulCriticalNesting++;
}
/*-----------------------------------------------------------*/

__arm __interwork void vPortExitCritical( void )
{
	if( ulCriticalNesting > portNO_CRITICAL_NESTING )
	{
		/* Decrement the nesting count as we are leaving a critical section. */
		ulCriticalNesting--;

		/* If the nesting level has reached zero then interrupts should be
		re-enabled. */
		if( ulCriticalNesting == portNO_CRITICAL_NESTING )
		{
			__enable_interrupt();
		}
	}
}
/*-----------------------------------------------------------*/






?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一二三四在线| 在线免费精品视频| 免费av成人在线| 亚洲a一区二区| 午夜精品久久久久久不卡8050| 亚洲女人的天堂| 亚洲制服丝袜av| 亚洲v中文字幕| 免费av成人在线| 国产精品一区二区久激情瑜伽| 国产九九视频一区二区三区| 91视频一区二区| 99久久国产综合精品女不卡| 91色九色蝌蚪| 欧美高清视频在线高清观看mv色露露十八| 欧美三级一区二区| 欧美一区二区视频在线观看2020 | 欧美人牲a欧美精品| 在线综合亚洲欧美在线视频| 欧美成人a在线| 国产欧美一二三区| 亚洲视频图片小说| 婷婷激情综合网| 久久国产婷婷国产香蕉| 福利一区二区在线| 欧美三区在线观看| 久久久五月婷婷| 综合自拍亚洲综合图不卡区| 午夜电影网亚洲视频| 国产在线精品一区二区夜色| 成人免费毛片a| 欧美色手机在线观看| 精品粉嫩aⅴ一区二区三区四区| 国产丝袜欧美中文另类| 亚洲精品久久嫩草网站秘色| 日韩电影一二三区| 丰满亚洲少妇av| 欧美日韩中文国产| 中文字幕久久午夜不卡| 亚洲国产视频在线| 成人综合婷婷国产精品久久 | 日韩精品一区二区三区视频在线观看| 日韩欧美国产一区二区在线播放| 亚洲视频一区二区在线| 精品一区二区三区免费毛片爱| 99久久精品国产精品久久| 精品久久人人做人人爱| 亚洲国产人成综合网站| 成人激情电影免费在线观看| 日韩一区二区在线播放| 夜夜精品视频一区二区| 风流少妇一区二区| 日韩一区二区三区电影| 伊人性伊人情综合网| 国产suv精品一区二区883| 日韩三级伦理片妻子的秘密按摩| 亚洲男人的天堂在线aⅴ视频| 国产成人精品一区二| 91精品国产综合久久福利| 亚洲一区二区视频在线| 97国产精品videossex| 国产午夜精品一区二区三区嫩草 | 国产精品一区二区免费不卡| 欧美一区二区三区色| 亚洲第一激情av| 欧美大片免费久久精品三p| 亚洲成av人片一区二区| 欧美日韩中字一区| 亚洲国产综合91精品麻豆| 91网站最新地址| 国产精品网站导航| 丁香亚洲综合激情啪啪综合| 久久久www成人免费毛片麻豆| 久久精品99久久久| xf在线a精品一区二区视频网站| 美腿丝袜一区二区三区| 欧美一级日韩一级| 捆绑调教美女网站视频一区| 日韩一区二区三区视频| 老司机精品视频导航| 2欧美一区二区三区在线观看视频| 久久精品国产一区二区三区免费看 | 另类人妖一区二区av| 精品国一区二区三区| 国精产品一区一区三区mba视频 | 99re8在线精品视频免费播放| 国产精品你懂的| 色就色 综合激情| 午夜精品久久久久久不卡8050| 欧美日韩成人在线一区| 欧美aⅴ一区二区三区视频| 欧美成人福利视频| 成人黄色小视频| 亚洲高清在线精品| 欧美成人一区二区三区在线观看| 极品少妇xxxx偷拍精品少妇| 国产午夜三级一区二区三| 99久久精品国产导航| 天天做天天摸天天爽国产一区| 精品欧美黑人一区二区三区| 欧美日韩一区三区四区| 久久激情五月激情| 亚洲欧美影音先锋| 欧美久久一二区| 国产成人8x视频一区二区| 亚洲人成影院在线观看| 91麻豆精品91久久久久久清纯| 国产精品一卡二| 夜夜精品视频一区二区| 久久久久成人黄色影片| 欧美性感一类影片在线播放| 麻豆精品一区二区av白丝在线| 国产精品你懂的| 欧美一级精品在线| 91免费精品国自产拍在线不卡| 免费成人你懂的| 一区二区欧美视频| 国产精品网站导航| 欧美岛国在线观看| 欧美日韩亚洲综合在线 | 91视频免费观看| 蜜臀av亚洲一区中文字幕| 中文字幕亚洲在| 日韩精品一区二区三区在线 | 欧美一区二区三区不卡| av影院午夜一区| 激情欧美一区二区| 日韩av一区二区在线影视| 综合久久给合久久狠狠狠97色| 精品理论电影在线| 欧美久久久久久蜜桃| 91在线精品一区二区| 国产精品一二三| 九九**精品视频免费播放| 亚洲福利电影网| 亚洲激情欧美激情| 中文字幕一区二区三区蜜月 | 成人app在线| 国产一二三精品| 蜜臀av一区二区在线免费观看| 亚洲va天堂va国产va久| 亚洲猫色日本管| 成人欧美一区二区三区白人 | 99精品欧美一区二区三区小说 | 在线播放中文字幕一区| 日韩精品一区二区三区四区| 欧美日韩的一区二区| 欧美在线观看视频在线| 色综合久久88色综合天天免费| 国产成a人亚洲精| 福利一区福利二区| av电影在线观看一区| 成人av电影免费在线播放| 成人av电影免费在线播放| 北岛玲一区二区三区四区| 成人精品小蝌蚪| proumb性欧美在线观看| 91在线视频免费91| 在线视频中文字幕一区二区| 欧美亚洲免费在线一区| 欧美日韩成人高清| 欧美大胆人体bbbb| 国产视频一区二区在线观看| 国产精品三级视频| 亚洲欧美激情插 | 国产精品久久影院| 亚洲视频一区在线| 亚州成人在线电影| 激情图区综合网| av电影在线观看一区| 欧美写真视频网站| 欧美成人r级一区二区三区| 欧美国产禁国产网站cc| 亚洲少妇屁股交4| 日韩成人伦理电影在线观看| 国内偷窥港台综合视频在线播放| 成人免费毛片app| 欧美午夜精品电影| 久久免费看少妇高潮| 亚洲伦理在线精品| 麻豆91精品视频| 91视频你懂的| 26uuu色噜噜精品一区二区| 国产精品美女久久久久久2018| 亚洲国产aⅴ成人精品无吗| 国精产品一区一区三区mba视频| av一区二区三区四区| 91精品国产综合久久久久久久久久| 久久欧美中文字幕| 亚洲一区二区免费视频| 国产精品一级黄| 在线电影欧美成精品| 国产精品私人影院| 秋霞av亚洲一区二区三| 暴力调教一区二区三区| 亚洲视频香蕉人妖| 久久精品国产999大香线蕉| 91在线观看污| 国产日韩精品一区| 日本三级亚洲精品|