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

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

?? port.c

?? FreeRTOSV4.1.0 安裝文件 FreeRTOS 是一個源碼公開的免費的嵌入式實時操作系統
?? C
字號:
/*
	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.
	***************************************************************************
*/

/*-----------------------------------------------------------
 * 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一区二区三区免费野_久草精品视频
久久综合九色综合欧美亚洲| 韩国成人福利片在线播放| 欧美精品一区二区三区视频 | 亚洲人成精品久久久久久| 精品国产91洋老外米糕| 精品国产精品网麻豆系列| 精品久久人人做人人爽| 久久久不卡网国产精品二区| 亚洲国产精品成人综合色在线婷婷| 久久久久久久久蜜桃| 国产欧美精品日韩区二区麻豆天美| 久久久亚洲精华液精华液精华液| 欧美国产一区在线| 亚洲精品中文字幕乱码三区| 亚洲精品乱码久久久久久| 日韩av在线播放中文字幕| 久久99国产精品麻豆| 国产91高潮流白浆在线麻豆| 97久久超碰国产精品| 欧美在线一区二区三区| 欧美一区二区视频在线观看| 久久久精品免费网站| 亚洲丝袜精品丝袜在线| 日韩 欧美一区二区三区| 国产不卡在线视频| 在线观看不卡一区| 久久综合狠狠综合| 亚洲你懂的在线视频| 麻豆精品一二三| 91亚洲国产成人精品一区二区三 | 欧美高清激情brazzers| 久久综合久久鬼色| 亚洲一线二线三线久久久| 久久99精品国产麻豆婷婷| 不卡av在线网| 日韩精品一区二区三区四区视频| 最近中文字幕一区二区三区| 免费在线一区观看| 欧美综合色免费| 日韩午夜激情视频| 一区二区在线观看不卡| 老汉av免费一区二区三区| 91麻豆视频网站| 久久久欧美精品sm网站| 午夜电影一区二区三区| 成人av网站在线观看| 日韩片之四级片| 亚洲一本大道在线| 99久久婷婷国产综合精品| 亚洲精品一区二区精华| 欧美aaaaa成人免费观看视频| 不卡av免费在线观看| 精品国产人成亚洲区| 亚洲午夜久久久久久久久电影院| 成人福利视频网站| 久久久久综合网| 久久精品理论片| 91麻豆精品国产91| 午夜私人影院久久久久| 91福利国产成人精品照片| 亚洲欧美一区二区三区极速播放 | 大胆亚洲人体视频| 精品久久久久香蕉网| 日韩av在线发布| 91精品在线免费| 午夜精品影院在线观看| 欧洲亚洲精品在线| 亚洲一区电影777| 欧美系列日韩一区| 天天色天天爱天天射综合| 欧美日韩午夜精品| 日日夜夜精品免费视频| 欧美精品自拍偷拍动漫精品| 亚洲va国产天堂va久久en| 欧美在线不卡一区| 亚洲成a人在线观看| 欧美日韩久久不卡| 美日韩一区二区| 久久嫩草精品久久久精品一| 国产精品一级黄| 国产精品久久久久久久久搜平片| 国产美女av一区二区三区| 国产亚洲欧洲一区高清在线观看| 国产精品69毛片高清亚洲| 国产欧美一区在线| 91在线porny国产在线看| 一区二区三区四区在线免费观看| 91福利精品视频| 蜜臀精品一区二区三区在线观看| 欧美不卡在线视频| 国产高清视频一区| 亚洲精品亚洲人成人网| 欧美日本韩国一区二区三区视频 | 午夜国产精品影院在线观看| 欧美精品自拍偷拍| 国产精品系列在线观看| 亚洲欧洲99久久| 欧美日韩一区二区在线观看 | 亚洲福利视频导航| 欧美一区二区三区人| 国产精品18久久久久久久久 | 亚洲成人激情社区| 精品国产免费一区二区三区香蕉| 国产成人免费xxxxxxxx| 一区二区三区中文字幕在线观看| 日韩视频一区在线观看| 国产高清视频一区| 日日夜夜一区二区| 中文字幕一区免费在线观看 | 国产一区二区在线电影| 一区二区三区在线不卡| 欧美不卡123| 欧美性感一类影片在线播放| 狠狠狠色丁香婷婷综合久久五月| 国产精品久久久久久久午夜片| 6080国产精品一区二区| www.av精品| 激情文学综合丁香| 亚洲超丰满肉感bbw| 国产精品视频线看| 欧美一区二区三区四区久久 | 日韩一区二区在线观看视频播放| 国产盗摄视频一区二区三区| 亚洲二区在线视频| 综合精品久久久| 久久免费视频色| 欧美一级片在线看| 欧美影院一区二区| 成人激情校园春色| 国产精品一区二区黑丝| 美女脱光内衣内裤视频久久网站| 一区二区三区免费看视频| 国产免费成人在线视频| 久久综合久久久久88| 日韩一级免费一区| 在线观看一区二区视频| 国产成人精品影视| 国产麻豆9l精品三级站| 精品一区二区三区免费观看| 天天操天天综合网| 亚洲h动漫在线| 午夜精品免费在线观看| 一区二区三区不卡在线观看| 综合精品久久久| 亚洲色图欧洲色图婷婷| 中文字幕在线观看一区二区| 中文久久乱码一区二区| 久久久99免费| 国产午夜精品一区二区| 久久男人中文字幕资源站| 久久日韩精品一区二区五区| 欧美成人a视频| 精品国产成人在线影院| 26uuu欧美| 国产视频视频一区| 国产精品女主播在线观看| 欧美韩国日本不卡| 亚洲四区在线观看| 亚洲成人福利片| 免费一级片91| 国产一区二区三区免费播放| 国产在线看一区| 高清不卡在线观看| 91一区一区三区| 欧美日韩精品一区二区三区四区| 欧美精三区欧美精三区| 久久欧美一区二区| 亚洲欧美怡红院| 午夜精品123| 激情五月播播久久久精品| 丁香一区二区三区| 欧洲精品中文字幕| 日韩欧美一级特黄在线播放| 久久久久久久久久久黄色| 国产精品久久久久婷婷| 亚洲主播在线观看| 国产中文一区二区三区| 成人不卡免费av| 欧美一区二区三区在线观看| 久久久99久久| 亚洲一区二区三区四区在线免费观看 | 91黄视频在线| 日韩一区二区在线看| 国产精品久久久久四虎| 日本亚洲三级在线| 成人av动漫网站| 51精品久久久久久久蜜臀| 亚洲国产精品99久久久久久久久| 亚洲精品国产第一综合99久久| 激情文学综合插| 欧美午夜精品一区二区蜜桃| 久久嫩草精品久久久精品 | 欧美一区二区在线视频| 国产亚洲精品aa午夜观看| 亚洲一区二区精品3399| 国产精品夜夜嗨| 日韩精品专区在线影院观看 | 91麻豆精品国产91久久久资源速度| 国产欧美一区二区三区鸳鸯浴| 日韩成人精品在线|