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

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

?? port.c

?? FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*This file has been prepared for Doxygen automatic documentation generation.*/
/*! \file *********************************************************************
 *
 * \brief FreeRTOS port source for AVR32 UC3.
 *
 * - Compiler:           GNU GCC for AVR32
 * - Supported devices:  All AVR32 devices can be used.
 * - AppNote:
 *
 * \author               Atmel Corporation: http://www.atmel.com \n
 *                       Support and FAQ: http://support.atmel.no/
 *
 *****************************************************************************/

/*
	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.
*/


/* Standard includes. */
#include <sys/cpu.h>
#include <sys/usart.h>
#include <malloc.h>

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

/* AVR32 UC3 includes. */
#include <avr32/io.h>
#include "gpio.h"
#if( configTICK_USE_TC==1 )
	#include "tc.h"
#endif


/* Constants required to setup the task context. */
#define portINITIAL_SR            ( ( portSTACK_TYPE ) 0x00400000 ) /* AVR32 : [M2:M0]=001 I1M=0 I0M=0, GM=0 */
#define portINSTRUCTION_SIZE      ( ( portSTACK_TYPE ) 0 )

/* Each task maintains its own critical nesting variable. */
#define portNO_CRITICAL_NESTING   ( ( unsigned portLONG ) 0 )
volatile unsigned portLONG ulCriticalNesting = 9999UL;

#if( configTICK_USE_TC==0 )
	static void prvScheduleNextTick( void );
#else
	static void prvClearTcInt( void );
#endif

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

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

/*
 * Low-level initialization routine called during startup, before the main
 * function.
 * This version comes in replacement to the default one provided by Newlib.
 * Newlib's _init_startup only calls init_exceptions, but Newlib's exception
 * vectors are not compatible with the SCALL management in the current FreeRTOS
 * port. More low-level initializations are besides added here.
 */
void _init_startup(void)
{
	/* Import the Exception Vector Base Address. */
	extern void _evba;

	#if configHEAP_INIT
		extern void __heap_start__;
		extern void __heap_end__;
		portBASE_TYPE *pxMem;
	#endif

	/* Load the Exception Vector Base Address in the corresponding system register. */
	Set_system_register( AVR32_EVBA, ( int ) &_evba );

	/* Enable exceptions. */
	ENABLE_ALL_EXCEPTIONS();

	/* Initialize interrupt handling. */
	INTC_init_interrupts();

	#if configHEAP_INIT

		/* Initialize the heap used by malloc. */
		for( pxMem = &__heap_start__; pxMem < ( portBASE_TYPE * )&__heap_end__; )
		{
			*pxMem++ = 0xA5A5A5A5;
		}

	#endif

	/* Give the used CPU clock frequency to Newlib, so it can work properly. */
	set_cpu_hz( configCPU_CLOCK_HZ );

	/* Code section present if and only if the debug trace is activated. */
	#if configDBG
	{
		static const gpio_map_t DBG_USART_GPIO_MAP =
		{
			{ configDBG_USART_RX_PIN, configDBG_USART_RX_FUNCTION },
			{ configDBG_USART_TX_PIN, configDBG_USART_TX_FUNCTION }
		};

		/* Initialize the USART used for the debug trace with the configured parameters. */
		set_usart_base( ( void * ) configDBG_USART );
		gpio_enable_module( DBG_USART_GPIO_MAP,
		                    sizeof( DBG_USART_GPIO_MAP ) / sizeof( DBG_USART_GPIO_MAP[0] ) );
		usart_init( configDBG_USART_BAUDRATE );
	}
	#endif
}
/*-----------------------------------------------------------*/

/*
 * malloc, realloc and free are meant to be called through respectively
 * pvPortMalloc, pvPortRealloc and vPortFree.
 * The latter functions call the former ones from within sections where tasks
 * are suspended, so the latter functions are task-safe. __malloc_lock and
 * __malloc_unlock use the same mechanism to also keep the former functions
 * task-safe as they may be called directly from Newlib's functions.
 * However, all these functions are interrupt-unsafe and SHALL THEREFORE NOT BE
 * CALLED FROM WITHIN AN INTERRUPT, because __malloc_lock and __malloc_unlock do
 * not call portENTER_CRITICAL and portEXIT_CRITICAL in order not to disable
 * interrupts during memory allocation management as this may be a very time-
 * consuming process.
 */

/*
 * Lock routine called by Newlib on malloc / realloc / free entry to guarantee a
 * safe section as memory allocation management uses global data.
 * See the aforementioned details.
 */
void __malloc_lock(struct _reent *ptr)
{
	vTaskSuspendAll();
}

/*
 * Unlock routine called by Newlib on malloc / realloc / free exit to guarantee
 * a safe section as memory allocation management uses global data.
 * See the aforementioned details.
 */
void __malloc_unlock(struct _reent *ptr)
{
	xTaskResumeAll();
}
/*-----------------------------------------------------------*/

/* Added as there is no such function in FreeRTOS. */
void *pvPortRealloc( void *pv, size_t xWantedSize )
{
void *pvReturn;

	vTaskSuspendAll();
	{
		pvReturn = realloc( pv, xWantedSize );
	}
	xTaskResumeAll();

	return pvReturn;
}
/*-----------------------------------------------------------*/

/* The cooperative scheduler requires a normal IRQ service routine to
simply increment the system tick. */
/* The preemptive scheduler is defined as "naked" as the full context is saved
on entry as part of the context switch. */
__attribute__((__naked__)) static void vTick( void )
{
	/* Save the context of the interrupted task. */
	portSAVE_CONTEXT_OS_INT();

	#if( configTICK_USE_TC==1 )
		/* Clear the interrupt flag. */
		prvClearTcInt();
	#else
		/* Schedule the COUNT&COMPARE match interrupt in (configCPU_CLOCK_HZ/configTICK_RATE_HZ)
		clock cycles from now. */
		prvScheduleNextTick();
	#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91行情网站电视在线观看高清版| aaa国产一区| 成人91在线观看| 欧美顶级少妇做爰| 中日韩免费视频中文字幕| 日本中文字幕一区二区有限公司| 丁香一区二区三区| 欧美一级视频精品观看| √…a在线天堂一区| 国产一区在线精品| 91精品久久久久久蜜臀| 中文字幕日韩精品一区| 极品美女销魂一区二区三区免费| 欧美视频在线不卡| 亚洲三级视频在线观看| 国产成人在线网站| 精品国产1区二区| 日韩不卡手机在线v区| 色先锋资源久久综合| 国产女主播视频一区二区| 国产女同性恋一区二区| 国产日本欧美一区二区| 亚洲一区二区三区中文字幕| 丰满少妇久久久久久久| 日韩欧美国产一区在线观看| 色综合天天综合色综合av| 国产自产v一区二区三区c| 精品夜夜嗨av一区二区三区| 91蜜桃婷婷狠狠久久综合9色| 91精品国产色综合久久不卡蜜臀 | 国产激情91久久精品导航| 99久久精品费精品国产一区二区| 久久亚洲影视婷婷| 国产精品性做久久久久久| 国产在线不卡视频| 成人性生交大合| 国产91精品露脸国语对白| 一本色道久久综合亚洲精品按摩| a级精品国产片在线观看| 国产在线精品一区二区夜色| 国产成人亚洲精品狼色在线| 国产九色精品成人porny| 精品一区二区久久| 五月天亚洲婷婷| 一本到一区二区三区| 亚洲女女做受ⅹxx高潮| 欧美色爱综合网| 青青草成人在线观看| 欧美精品一区二区久久久| 国产精品18久久久久| 国产嫩草影院久久久久| av中文字幕亚洲| 亚洲精选在线视频| 欧美日韩久久久| 免费成人结看片| 欧美经典一区二区三区| 99久久99久久精品免费观看| 亚洲一区二区三区在线| 日韩一区二区三区视频在线| 国内外精品视频| 亚洲天堂a在线| 91精品国产色综合久久不卡电影| 精品无码三级在线观看视频| 中文字幕 久热精品 视频在线| 色哟哟国产精品| 日本不卡的三区四区五区| 欧美激情一区二区在线| 欧美性一二三区| 久久精品国产免费| 26uuu欧美日本| 欧美日韩三级一区| 99久久婷婷国产综合精品| 久久精子c满五个校花| 国产亚洲1区2区3区| 亚洲精品国产无套在线观| 99久久夜色精品国产网站| 亚洲欧美怡红院| 在线成人av影院| 国产在线精品一区二区| 图片区日韩欧美亚洲| 亚洲一级二级在线| 天堂精品中文字幕在线| 日韩成人免费看| 国产在线一区二区综合免费视频| 蜜臀精品一区二区三区在线观看| 免费观看日韩电影| 国产九九视频一区二区三区| 亚洲三级电影网站| 欧洲一区在线电影| 国产中文一区二区三区| 亚洲精品免费一二三区| 欧美天天综合网| 国产高清不卡二三区| 青青草国产成人av片免费| 欧美xxxxx牲另类人与| 91免费国产在线观看| 亚洲综合精品自拍| 国产精品免费看片| 国产在线视频精品一区| 亚洲国产成人porn| 亚洲欧美日本韩国| 国产精品久久影院| 国产亚洲一区二区三区| 日韩一级完整毛片| 欧美日韩国产成人在线91| 91亚洲精品久久久蜜桃| av亚洲精华国产精华精| 国产不卡视频在线观看| 国产在线精品一区二区夜色 | 五月天激情小说综合| 亚洲欧美aⅴ...| 中文一区在线播放| 国产精品人妖ts系列视频| 精品999久久久| 精品国产乱码久久久久久1区2区| 在线成人免费视频| 在线综合亚洲欧美在线视频| 欧美日本韩国一区| 欧美一区二区三区人| 日韩天堂在线观看| 欧美大片在线观看| 欧美精品一区二区久久久| 久久久精品人体av艺术| 久久精品综合网| 欧美国产激情二区三区| 亚洲日本护士毛茸茸| 亚洲高清三级视频| 一本大道综合伊人精品热热| 国产精品视频yy9299一区| 久久久欧美精品sm网站| 制服丝袜av成人在线看| 欧美日韩国产美| 久久久久久久久久久久电影| 亚洲精品成人少妇| 精品在线播放免费| 精品成人在线观看| 国产一区二区不卡| |精品福利一区二区三区| 91精品1区2区| 蜜臀av性久久久久蜜臀aⅴ| 91精品国产一区二区三区蜜臀 | 亚洲视频一区在线观看| 99久久久国产精品| 亚洲自拍欧美精品| 欧美怡红院视频| 国产精品天天看| 久久99精品网久久| 日本韩国欧美国产| 欧美成人乱码一区二区三区| 中文字幕亚洲电影| 青娱乐精品视频| 6080亚洲精品一区二区| 国产亲近乱来精品视频| 国产综合久久久久久久久久久久| 欧美视频一区二区三区四区| 国产亚洲一本大道中文在线| 制服丝袜激情欧洲亚洲| 日韩欧美一区二区免费| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲线精品一区二区三区 | 一区二区三区在线视频免费观看| 亚洲高清三级视频| 成人一级视频在线观看| 91精品国产综合久久福利| 国产精品美女一区二区在线观看| 日韩精品高清不卡| 97久久精品人人爽人人爽蜜臀 | 欧美日本在线播放| 国产免费成人在线视频| 日精品一区二区| 91色综合久久久久婷婷| 久久老女人爱爱| 日日夜夜免费精品| 色域天天综合网| 国产欧美日韩在线视频| 美国毛片一区二区三区| 欧美性三三影院| 中文字幕一区二区5566日韩| 狠狠久久亚洲欧美| 日韩欧美一二区| 午夜亚洲国产au精品一区二区| 99精品国产99久久久久久白柏| 久久人人爽爽爽人久久久| 五月激情综合婷婷| 欧美性生活一区| 亚洲老妇xxxxxx| 91丨九色丨尤物| 国产精品久久久久久久午夜片 | 欧美不卡在线视频| 亚洲综合久久久久| 日韩午夜激情免费电影| 国产黄人亚洲片| 国产麻豆视频精品| 国产精选一区二区三区| 精品制服美女丁香| 国产一区二区三区美女| 国产在线精品国自产拍免费| 99re成人精品视频| 国产欧美日韩激情| 久久99精品久久久久婷婷|