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

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

?? port.c

?? MCS-51的一個Free小型操作系統(tǒng),在KeilC中下編譯工作
?? C
字號:
/*
	FreeRTOS.org V4.1.3 - 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.
	***************************************************************************
*/

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






?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产欧美综合| 日韩高清不卡一区| 亚洲高清免费视频| 91免费视频观看| 26uuu色噜噜精品一区二区| 亚洲欧美另类久久久精品2019| 美日韩一级片在线观看| 91黄色激情网站| 国产精品乱人伦一区二区| 国内久久婷婷综合| 91麻豆精品国产91| 一卡二卡三卡日韩欧美| 99久久精品国产毛片| 久久久一区二区三区| 久久99热国产| 宅男在线国产精品| 亚洲成人精品在线观看| 色素色在线综合| 综合久久久久久久| 91免费精品国自产拍在线不卡 | 麻豆精品视频在线| 在线观看日韩精品| 伊人开心综合网| 99久久久免费精品国产一区二区| 一区av在线播放| 色欧美片视频在线观看在线视频| 欧美高清在线一区二区| 国产成a人亚洲| 久久久99精品久久| 成人三级伦理片| 中文字幕二三区不卡| voyeur盗摄精品| 自拍偷拍欧美精品| 日本道免费精品一区二区三区| 国产精品国产三级国产a| 欧美精品丝袜中出| 亚洲va国产va欧美va观看| 欧美三级电影一区| 热久久国产精品| 精品三级av在线| 国产成人免费视频精品含羞草妖精| 久久久www成人免费毛片麻豆 | 亚洲影院理伦片| 欧美在线观看一区二区| 亚洲国产成人va在线观看天堂| 欧美色图12p| 国产成人福利片| 日韩一区在线看| 91成人免费网站| 青青草国产成人99久久| 久久免费电影网| www.亚洲人| 亚洲www啪成人一区二区麻豆| 欧美精品1区2区3区| 久久精品久久综合| 国产精品区一区二区三区| 色婷婷综合视频在线观看| 亚洲国产精品欧美一二99| 国产精品久久久久久久久免费相片| 97国产精品videossex| 日韩高清不卡一区二区三区| 久久五月婷婷丁香社区| 91丨porny丨最新| 日韩不卡手机在线v区| 久久蜜桃av一区精品变态类天堂 | 美腿丝袜亚洲色图| 国产精品成人免费在线| 欧美日韩精品免费| 国产成人在线色| 亚洲福利一二三区| 国产片一区二区三区| ww亚洲ww在线观看国产| 99精品欧美一区二区三区小说| 曰韩精品一区二区| 久久中文字幕电影| 欧美亚洲日本国产| 国产不卡在线一区| 婷婷成人综合网| 国产精品久久久久久久久免费丝袜 | 一区二区三区中文字幕| 日韩欧美亚洲一区二区| 成人av在线看| 久久99精品久久久久久久久久久久| 国产精品免费aⅴ片在线观看| 欧美老女人在线| av一本久道久久综合久久鬼色| 日韩高清不卡在线| 一区2区3区在线看| 国产精品二三区| 久久久精品黄色| 日韩精品综合一本久道在线视频| 色综合久久中文字幕综合网 | 亚洲一二三级电影| 久久久www成人免费无遮挡大片| 欧美卡1卡2卡| 一本色道久久综合亚洲aⅴ蜜桃| 久久精品久久综合| 日本中文字幕一区| 亚洲成人自拍网| 亚洲精品五月天| 日韩高清在线观看| 亚洲一区二区三区四区五区黄| 国产日韩欧美一区二区三区综合| 日韩精品一区二区三区在线观看| 欧美日韩亚洲综合在线| 91在线视频观看| 国产剧情一区在线| 精品一区中文字幕| 久久精品国产色蜜蜜麻豆| 麻豆视频一区二区| 免费视频最近日韩| 麻豆精品国产传媒mv男同| 日本一区中文字幕| 三级影片在线观看欧美日韩一区二区| 亚洲免费大片在线观看| 亚洲三级久久久| 狠狠色狠狠色综合日日91app| 日韩不卡一区二区| 久久国产人妖系列| 国产成人精品一区二区三区四区| 国产精品一卡二卡| 国产宾馆实践打屁股91| 成人一道本在线| 色综合久久99| 欧美卡1卡2卡| 欧美精品一区二区三区一线天视频| 日韩精品资源二区在线| 久久久久国产精品厨房| 国产偷国产偷亚洲高清人白洁| 国产欧美一区二区三区在线老狼| 午夜影院在线观看欧美| 轻轻草成人在线| 国产在线精品视频| www.综合网.com| 欧美日韩视频一区二区| 精品日韩一区二区三区免费视频| 精品国产在天天线2019| 国产精品午夜电影| 亚洲综合在线视频| 麻豆一区二区三| 成人性生交大片免费看中文网站| 91猫先生在线| 91精品国产免费久久综合| 久久影院午夜片一区| 国产一区二区不卡在线 | 色狠狠av一区二区三区| 欧美专区在线观看一区| 欧美男人的天堂一二区| 久久欧美一区二区| 亚洲精品日日夜夜| 看片的网站亚洲| 99在线精品免费| 欧美一区二区三区免费观看视频| 精品国产91洋老外米糕| 亚洲乱码精品一二三四区日韩在线| 亚洲午夜久久久久久久久久久| 在线精品视频免费播放| 欧美r级电影在线观看| 亚洲啪啪综合av一区二区三区| 日韩影院精彩在线| av电影在线观看完整版一区二区| 91精品免费观看| 国产精品国产馆在线真实露脸| 亚洲va天堂va国产va久| 99视频一区二区| 精品福利一区二区三区免费视频| 亚洲天堂2014| 国产一区二区三区视频在线播放| 欧美最猛黑人xxxxx猛交| 国产视频一区在线观看 | 精品三级在线观看| 亚洲卡通动漫在线| 国产精品一区久久久久| 91精品国产一区二区人妖| 亚洲欧美日韩国产手机在线 | 91在线观看视频| 久久日韩粉嫩一区二区三区| 亚洲成av人影院在线观看网| 不卡区在线中文字幕| 亚洲精品一线二线三线无人区| 亚洲成人777| 久久久久99精品国产片| 捆绑紧缚一区二区三区视频| 欧美日韩国产成人在线91| 亚洲精品乱码久久久久久日本蜜臀| 九九九久久久精品| 欧美一级黄色大片| 日韩电影在线看| 8x福利精品第一导航| 亚洲风情在线资源站| 色婷婷av一区二区三区之一色屋| 国产精品乱码人人做人人爱 | 欧美精品1区2区3区| 亚洲国产精品自拍| 久久久久99精品国产片| 蜜桃av一区二区| 日韩欧美国产电影| 日本欧美肥老太交大片| 日韩亚洲欧美一区二区三区| 毛片av一区二区三区|