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

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

?? port.c

?? FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
?? C
字號:
/*
	FreeRTOS.org V5.2.0 - Copyright (C) 2003-2009 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 (version 2) as published
	by the Free Software Foundation and modified by the FreeRTOS exception.

	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 is included to allow you 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.


	***************************************************************************
	*                                                                         *
	* Get the FreeRTOS eBook!  See http://www.FreeRTOS.org/Documentation      *
	*                                                                         *
	* This is a concise, step by step, 'hands on' guide that describes both   *
	* general multitasking concepts and FreeRTOS specifics. It presents and   *
	* explains numerous examples that are written using the FreeRTOS API.     *
	* Full source code for all the examples is provided in an accompanying    *
	* .zip file.                                                              *
	*                                                                         *
	***************************************************************************

	1 tab == 4 spaces!

	Please ensure to read the configuration and relevant port sections of the
	online documentation.

	http://www.FreeRTOS.org - Documentation, latest information, license and
	contact details.

	http://www.SafeRTOS.com - A version that is certified for use in safety
	critical systems.

	http://www.OpenRTOS.com - Commercial support, development, porting,
	licensing and training services.
*/

/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for the ARM CM3 port.
 *----------------------------------------------------------*/

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

/* For backward compatibility, ensure configKERNEL_INTERRUPT_PRIORITY is
defined.  The value should also ensure backward compatibility.
FreeRTOS.org versions prior to V4.4.0 did not include this definition. */
#ifndef configKERNEL_INTERRUPT_PRIORITY
	#define configKERNEL_INTERRUPT_PRIORITY 255
#endif

/* Constants required to manipulate the NVIC. */
#define portNVIC_SYSTICK_CTRL		( ( volatile unsigned portLONG *) 0xe000e010 )
#define portNVIC_SYSTICK_LOAD		( ( volatile unsigned portLONG *) 0xe000e014 )
#define portNVIC_INT_CTRL			( ( volatile unsigned portLONG *) 0xe000ed04 )
#define portNVIC_SYSPRI2			( ( volatile unsigned portLONG *) 0xe000ed20 )
#define portNVIC_SYSTICK_CLK		0x00000004
#define portNVIC_SYSTICK_INT		0x00000002
#define portNVIC_SYSTICK_ENABLE		0x00000001
#define portNVIC_PENDSVSET			0x10000000
#define portNVIC_PENDSV_PRI			( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 16 )
#define portNVIC_SYSTICK_PRI		( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 24 )

/* Constants required to set up the initial stack. */
#define portINITIAL_XPSR			( 0x01000000 )

/* The priority used by the kernel is assigned to a variable to make access
from inline assembler easier. */
const unsigned portLONG ulKernelPriority = configKERNEL_INTERRUPT_PRIORITY;

/* Each task maintains its own interrupt status in the critical nesting
variable. */
static unsigned portBASE_TYPE uxCriticalNesting = 0xaaaaaaaa;

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

/*
 * Exception handlers.
 */
void xPortPendSVHandler( void ) __attribute__ (( naked ));
void xPortSysTickHandler( void );
void vPortSVCHandler( void ) __attribute__ (( naked ));

/*
 * Start first task is a separate function so it can be tested in isolation.
 */
void vPortStartFirstTask( void ) __attribute__ (( naked ));

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

/*
 * See header file for description.
 */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{
	/* Simulate the stack frame as it would be created by a context switch
	interrupt. */
	*pxTopOfStack = portINITIAL_XPSR;	/* xPSR */
	pxTopOfStack--;
	*pxTopOfStack = ( portSTACK_TYPE ) pxCode;	/* PC */
	pxTopOfStack--;
	*pxTopOfStack = 0;	/* LR */
	pxTopOfStack -= 5;	/* R12, R3, R2 and R1. */
	*pxTopOfStack = ( portSTACK_TYPE ) pvParameters;	/* R0 */
	pxTopOfStack -= 8;	/* R11, R10, R9, R8, R7, R6, R5 and R4. */

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

void vPortSVCHandler( void )
{
	asm volatile (
					"	ldr	r3, pxCurrentTCBConst2		\n" /* Restore the context. */
					"	ldr r1, [r3]					\n" /* Use pxCurrentTCBConst to get the pxCurrentTCB address. */
					"	ldr r0, [r1]					\n" /* The first item in pxCurrentTCB is the task top of stack. */
					"	ldmia r0!, {r4-r11}				\n" /* Pop the registers that are not automatically saved on exception entry and the critical nesting count. */
					"	msr psp, r0						\n" /* Restore the task stack pointer. */
					"	mov r0, #0 						\n"
					"	msr	basepri, r0					\n"
					"	orr r14, #0xd					\n"
					"	bx r14							\n"
					"									\n"
					"	.align 2						\n"
					"pxCurrentTCBConst2: .word pxCurrentTCB				\n"
				);
}
/*-----------------------------------------------------------*/

void vPortStartFirstTask( void )
{
	asm volatile(
					" ldr r0, =0xE000ED08 	\n" /* Use the NVIC offset register to locate the stack. */
					" ldr r0, [r0] 			\n"
					" ldr r0, [r0] 			\n"
					" msr msp, r0			\n" /* Set the msp back to the start of the stack. */
					" svc 0					\n" /* System call to start first task. */
				);
}
/*-----------------------------------------------------------*/

/*
 * See header file for description.
 */
portBASE_TYPE xPortStartScheduler( void )
{
	/* Make PendSV, CallSV and SysTick the same priroity as the kernel. */
	*(portNVIC_SYSPRI2) |= portNVIC_PENDSV_PRI;
	*(portNVIC_SYSPRI2) |= portNVIC_SYSTICK_PRI;

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

	/* Initialise the critical nesting count ready for the first task. */
	uxCriticalNesting = 0;

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

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

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

void vPortYieldFromISR( void )
{
	/* Set a PendSV to request a context switch. */
	*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
}
/*-----------------------------------------------------------*/

void vPortEnterCritical( void )
{
	portDISABLE_INTERRUPTS();
	uxCriticalNesting++;
}
/*-----------------------------------------------------------*/

void vPortExitCritical( void )
{
	uxCriticalNesting--;
	if( uxCriticalNesting == 0 )
	{
		portENABLE_INTERRUPTS();
	}
}
/*-----------------------------------------------------------*/

void xPortPendSVHandler( void )
{
	/* This is a naked function. */

	__asm volatile
	(
	"	mrs r0, psp							\n"
	"										\n"
	"	ldr	r3, pxCurrentTCBConst			\n" /* Get the location of the current TCB. */
	"	ldr	r2, [r3]						\n"
	"										\n"
	"	stmdb r0!, {r4-r11}					\n" /* Save the remaining registers. */
	"	str r0, [r2]						\n" /* Save the new top of stack into the first member of the TCB. */
	"										\n"
	"	stmdb sp!, {r3, r14}				\n"
	"	mov r0, %0							\n"
	"	msr basepri, r0						\n"
	"	bl vTaskSwitchContext				\n"
	"	mov r0, #0							\n"
	"	msr basepri, r0						\n"			
	"	ldmia sp!, {r3, r14}				\n"
	"										\n"	/* Restore the context, including the critical nesting count. */
	"	ldr r1, [r3]						\n"
	"	ldr r0, [r1]						\n" /* The first item in pxCurrentTCB is the task top of stack. */
	"	ldmia r0!, {r4-r11}					\n" /* Pop the registers. */
	"	msr psp, r0							\n"
	"	bx r14								\n"
	"										\n"
	"	.align 2							\n"
	"pxCurrentTCBConst: .word pxCurrentTCB	\n"
	::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY)
	);
}
/*-----------------------------------------------------------*/

void xPortSysTickHandler( void )
{
unsigned portLONG ulDummy;

	/* If using preemption, also force a context switch. */
	#if configUSE_PREEMPTION == 1
		*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
	#endif

	ulDummy = portSET_INTERRUPT_MASK_FROM_ISR();
	{
		vTaskIncrementTick();
	}
	portCLEAR_INTERRUPT_MASK_FROM_ISR( ulDummy );
}
/*-----------------------------------------------------------*/

/*
 * Setup the systick timer to generate the tick interrupts at the required
 * frequency.
 */
void prvSetupTimerInterrupt( void )
{
	/* Configure SysTick to interrupt at the requested rate. */
	*(portNVIC_SYSTICK_LOAD) = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
	*(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE;
}
/*-----------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区二区三区视频| 日韩综合小视频| 国内精品写真在线观看| 欧美三级在线视频| 亚洲另类一区二区| 成人黄色一级视频| 国产网红主播福利一区二区| 久久成人精品无人区| 欧美一级艳片视频免费观看| 日本欧美大码aⅴ在线播放| 成人午夜精品在线| 久久久激情视频| 久久国产福利国产秒拍| 日韩欧美一级二级三级| 久久精品999| 日韩欧美国产午夜精品| 激情综合网最新| 精品国内片67194| 激情小说亚洲一区| 久久久激情视频| caoporen国产精品视频| 国产欧美日韩三区| a级精品国产片在线观看| 国产露脸91国语对白| 国产亚洲va综合人人澡精品| 亚洲成人先锋电影| 日韩欧美在线影院| 国产伦精品一区二区三区免费迷| 久久久久久久久久看片| 国产不卡在线视频| 亚洲色图制服丝袜| 欧美三级一区二区| 蜜桃av一区二区在线观看| 精品久久人人做人人爱| 成人午夜视频福利| 亚洲已满18点击进入久久| 91视频国产资源| 亚洲成av人片www| 日韩欧美精品在线视频| 国产精品一区二区果冻传媒| 亚洲视频小说图片| 欧美日韩高清影院| 国产专区欧美精品| 亚洲视频香蕉人妖| 欧美一级日韩免费不卡| 成人深夜福利app| 亚洲一区二区中文在线| 欧美mv日韩mv| 一本到三区不卡视频| 美脚の诱脚舐め脚责91 | 日韩欧美电影在线| 国产精品中文字幕日韩精品| 综合电影一区二区三区| 宅男噜噜噜66一区二区66| 国产成人精品亚洲午夜麻豆| 一区二区三区丝袜| 精品sm在线观看| 9i在线看片成人免费| 免费黄网站欧美| 日韩一区欧美小说| 精品国产成人在线影院| 成人av高清在线| 免费不卡在线观看| 久久日韩粉嫩一区二区三区| 欧美性一二三区| 处破女av一区二区| 日本不卡视频一二三区| 最新日韩av在线| 26uuu国产在线精品一区二区| 91免费观看在线| 国产剧情在线观看一区二区| 亚洲三级在线看| 久久精品男人天堂av| 欧美精品在线视频| 成人黄页在线观看| 国产精品综合在线视频| 日本aⅴ亚洲精品中文乱码| 一区二区三区在线影院| 久久亚洲一级片| 天天综合色天天综合色h| 亚洲视频图片小说| 亚洲日本护士毛茸茸| 久久网站最新地址| 国产色产综合色产在线视频| 国产视频一区二区在线| 国产精品乱码妇女bbbb| 亚洲特黄一级片| 亚洲综合精品久久| 日韩综合小视频| 久久99久国产精品黄毛片色诱| 九九精品一区二区| 国产99久久久久久免费看农村| 国产高清亚洲一区| 成人av先锋影音| 在线免费观看日韩欧美| 欧美一卡二卡在线观看| 精品国产乱码91久久久久久网站| 精品三级av在线| 国产精品毛片无遮挡高清| 亚洲婷婷国产精品电影人久久| 亚洲美女免费视频| 日韩在线a电影| 国产ts人妖一区二区| 色综合天天在线| 日韩视频在线永久播放| 国产亚洲午夜高清国产拍精品| 18成人在线视频| 日韩成人免费电影| 国产白丝精品91爽爽久久| 日本高清视频一区二区| 欧美一级欧美一级在线播放| 欧美激情中文字幕一区二区| 亚洲另类中文字| 精品一区免费av| 91久久精品国产91性色tv| 日韩欧美国产一区二区三区| 日韩一区日韩二区| 久久不见久久见免费视频7| 成人av电影在线观看| 日韩一区二区在线观看视频 | 欧美午夜精品理论片a级按摩| 91精品国产综合久久婷婷香蕉 | 一区二区三区在线播| 久久激情五月婷婷| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美激情一区在线| 天天综合天天综合色| 99精品欧美一区二区三区小说| 欧美精品乱码久久久久久| 中文字幕成人网| 免费高清不卡av| 在线观看欧美日本| 国产三级精品在线| 蜜桃在线一区二区三区| 在线免费观看一区| 国产精品免费视频一区| 蜜臀av一区二区在线免费观看 | 欧美日韩一级大片网址| 国产女人aaa级久久久级| 日韩国产精品久久久久久亚洲| 95精品视频在线| 国产女同互慰高潮91漫画| 久久精品理论片| 在线观看91av| 亚洲一区二区三区四区在线观看| 成人白浆超碰人人人人| 国产日产精品一区| 欧美日韩中文国产| 亚洲天堂免费在线观看视频| 国产一区视频网站| 日韩视频免费观看高清完整版在线观看| 国产精品日韩成人| 国产成人精品三级| 精品福利一区二区三区| 日本系列欧美系列| 777久久久精品| 日韩专区一卡二卡| 欧美日韩亚州综合| 亚洲风情在线资源站| 日本乱人伦一区| 亚洲色图视频网| 色婷婷精品大在线视频| 亚洲人成影院在线观看| 99精品热视频| 亚洲精品国产精华液| 欧美亚洲日本一区| 亚洲成人免费在线| 91麻豆精品国产自产在线观看一区| 亚洲影视资源网| 欧美精品黑人性xxxx| 首页国产欧美日韩丝袜| 欧美一区二区三区婷婷月色| 天堂午夜影视日韩欧美一区二区| 欧美久久久久久久久中文字幕| 亚洲图片欧美综合| 欧美色涩在线第一页| 亚洲aⅴ怡春院| 日韩一区二区三区观看| 麻豆精品国产传媒mv男同| 日韩免费高清av| 激情丁香综合五月| 国产欧美一区二区精品婷婷| 不卡免费追剧大全电视剧网站| 国产精品少妇自拍| 色婷婷综合中文久久一本| 亚洲第一狼人社区| 日韩欧美亚洲国产精品字幕久久久| 久久99国内精品| 欧美国产激情一区二区三区蜜月| 成人性生交大片免费看视频在线 | 欧美本精品男人aⅴ天堂| 韩国女主播一区二区三区| 欧美极品aⅴ影院| 99精品视频中文字幕| 亚洲国产精品久久一线不卡| 日韩一区二区三区精品视频| 国产一区二区三区视频在线播放| 中文字幕av一区 二区| 欧美午夜不卡视频| 国产在线播放一区二区三区|