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

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

?? port.c

?? freertosV4.40 是一種small的嵌入式系統(tǒng)。利于嵌入式開(kāi)好者入門學(xué)習(xí)嵌入式操作系統(tǒng)。通過(guò)對(duì)于源碼的學(xué)習(xí)可以很好的掌握f(shuō)reertos的運(yùn)行機(jī)制。
?? C
字號(hào):
/*
	FreeRTOS.org V4.4.0 - 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();
		}
	}
}
/*-----------------------------------------------------------*/






?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频你懂的| 亚洲图片有声小说| 欧美另类久久久品| 狠狠色丁香久久婷婷综| 亚洲精品高清视频在线观看| 日韩女优制服丝袜电影| 99精品国产一区二区三区不卡| 日本vs亚洲vs韩国一区三区二区| 国产精品国产自产拍高清av| 欧美一区二区三区免费| 日本韩国视频一区二区| 国产精品12区| 久久精品国产一区二区| 亚洲国产三级在线| 成人欧美一区二区三区小说| 久久久美女艺术照精彩视频福利播放| 精品污污网站免费看| 99国产精品99久久久久久| 狠狠网亚洲精品| 免费人成精品欧美精品| 亚洲成av人影院| 一区二区三区中文免费| 国产精品久久久久久久久果冻传媒 | 欧美色图片你懂的| 久久国产福利国产秒拍| 亚瑟在线精品视频| 久久九九国产精品| 精品欧美久久久| 欧美videos大乳护士334| 91精品国产91久久久久久一区二区 | 一本久道中文字幕精品亚洲嫩| 国产精品亚洲视频| 国产精品456露脸| 国产精品一级片在线观看| 久国产精品韩国三级视频| 日本亚洲电影天堂| 免费精品视频最新在线| 秋霞成人午夜伦在线观看| 午夜一区二区三区视频| 五月综合激情网| 天天色 色综合| 三级欧美在线一区| 视频一区二区中文字幕| 青青草97国产精品免费观看无弹窗版| 午夜精品视频在线观看| 一区二区在线观看av| 伊人色综合久久天天| 国产精品免费网站在线观看| 中文字幕一区av| 国产精品久久久久一区二区三区 | 国产久卡久卡久卡久卡视频精品| 久久爱另类一区二区小说| 久久99国产精品久久99果冻传媒| 久久精工是国产品牌吗| 国内精品视频一区二区三区八戒| 极品少妇xxxx精品少妇偷拍| 国产黑丝在线一区二区三区| 成人高清免费观看| 欧美视频你懂的| 制服丝袜亚洲网站| 精品国产成人系列| 亚洲国产精品黑人久久久| 国产精品国产自产拍在线| 欧美一区二区免费视频| 国产在线播放一区三区四| 久久精品国产秦先生| 久久久久久久久久久99999| 2023国产精品自拍| 裸体一区二区三区| 全国精品久久少妇| 972aa.com艺术欧美| 欧美午夜一区二区三区| 精品久久久久久久久久久久久久久| www国产成人免费观看视频 深夜成人网| 久久久久久一二三区| 亚洲精品美腿丝袜| 久久国产精品无码网站| 99在线热播精品免费| 337p亚洲精品色噜噜| 欧美精彩视频一区二区三区| 亚洲精品欧美在线| 韩国三级在线一区| 色av综合在线| 久久伊99综合婷婷久久伊| 亚洲视频每日更新| 美腿丝袜亚洲三区| 91丨porny丨首页| 欧美xxx久久| 一区二区三区在线免费播放| 国产永久精品大片wwwapp| 色爱区综合激月婷婷| 久久久激情视频| 亚洲国产视频a| 成人动漫视频在线| 欧美日韩精品免费观看视频| 国产日韩欧美综合在线| 日日夜夜一区二区| 91美女精品福利| ww亚洲ww在线观看国产| 亚洲国产精品一区二区久久| 国产精品自产自拍| 欧美一区二区免费视频| 一片黄亚洲嫩模| 成人免费视频视频在线观看免费| 91精品国产高清一区二区三区| 国产精品国产三级国产aⅴ中文| 伦理电影国产精品| 欧美亚洲一区二区在线观看| 欧美国产精品v| 久草热8精品视频在线观看| 欧美优质美女网站| 国产精品美女www爽爽爽| 精品一区二区三区不卡 | 日韩精品久久理论片| aaa欧美日韩| 欧美激情一区二区三区在线| 久久精品国产第一区二区三区 | 久久久综合视频| 粉嫩一区二区三区性色av| 欧美伦理电影网| 亚洲国产精品久久久久秋霞影院| av不卡在线播放| 亚洲国产成人私人影院tom | 成人看片黄a免费看在线| 日韩精品一区二区三区中文精品| 亚洲18色成人| 欧美精品xxxxbbbb| 天堂精品中文字幕在线| 在线亚洲免费视频| 亚洲精品视频观看| 欧美性一二三区| 亚洲国产精品自拍| 欧美日韩一区二区三区在线看| 亚洲美女在线一区| 色综合久久综合| 亚洲欧美日韩国产另类专区| 91视频国产观看| 亚洲欧美色图小说| 在线观看欧美黄色| 亚洲综合激情另类小说区| 欧美无砖专区一中文字| 亚洲国产欧美日韩另类综合| 欧美亚洲综合久久| 视频一区视频二区中文字幕| 91精品免费在线观看| 免费观看久久久4p| 2021国产精品久久精品| 国产一区二区精品在线观看| 国产三级久久久| 一本色道久久综合狠狠躁的推荐| 一级中文字幕一区二区| 8x8x8国产精品| 美女视频黄 久久| 国产三级精品三级在线专区| 99久久久无码国产精品| 亚洲精品va在线观看| 欧美视频在线观看一区| 蜜臀av一级做a爰片久久| 久久亚洲私人国产精品va媚药| 国产自产视频一区二区三区| 中文字幕高清不卡| 欧美午夜精品久久久久久超碰| 日韩成人伦理电影在线观看| 精品国产精品一区二区夜夜嗨| 成人福利在线看| 亚洲午夜影视影院在线观看| 6080午夜不卡| 国产成人综合视频| 亚洲综合色自拍一区| 欧美一级高清大全免费观看| 国产高清在线精品| 亚洲精品成人在线| 日韩欧美亚洲另类制服综合在线| 国产一区在线观看麻豆| 亚洲欧美成aⅴ人在线观看| 欧美一级黄色录像| 日韩欧美一区二区久久婷婷| 国产伦理精品不卡| 亚洲国产成人av| 久久久.com| 欧美视频一区在线观看| 国产一区二区0| 亚洲自拍另类综合| 久久精品这里都是精品| 欧美色男人天堂| 国产精品一区二区x88av| 一区二区三区电影在线播| 日韩精品资源二区在线| 91美女视频网站| 九九视频精品免费| 亚洲一区在线观看视频| 国产校园另类小说区| 88在线观看91蜜桃国自产| 粉嫩一区二区三区性色av| 图片区小说区国产精品视频| 国产精品色一区二区三区| 69堂成人精品免费视频| 色婷婷综合久久久久中文| 国产一区二区精品在线观看| 午夜av区久久|