亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩亚洲综合一区| 亚洲精品美腿丝袜| 日韩一区二区三区电影| 欧美精品vⅰdeose4hd| 欧美日韩一卡二卡三卡 | 欧美午夜一区二区三区| 一本色道久久加勒比精品| 色婷婷精品久久二区二区蜜臂av| 91蜜桃婷婷狠狠久久综合9色| 99视频在线观看一区三区| av成人老司机| 欧洲色大大久久| 欧美日韩成人综合天天影院| 91精品视频网| www国产成人免费观看视频 深夜成人网 | 国产99精品国产| 福利电影一区二区| 99精品国产视频| 在线观看成人小视频| 欧美精品777| 精品国产一区二区三区av性色| 欧美精品一区二区久久久| 久久久久国产精品厨房| 1024精品合集| 亚洲国产精品一区二区尤物区| 日韩精品一级中文字幕精品视频免费观看| 日本网站在线观看一区二区三区| 免费视频最近日韩| 国产成a人无v码亚洲福利| 色综合久久99| 91麻豆精品国产91久久久 | 久久婷婷国产综合精品青草 | 美女视频网站黄色亚洲| 精品在线你懂的| av中文字幕一区| 欧美乱妇23p| 久久久国产精品麻豆| 亚洲欧洲日韩女同| 五月婷婷激情综合网| 国产成人一区在线| 欧美在线观看一区| 2020日本不卡一区二区视频| 日韩毛片视频在线看| 日本不卡123| 99久久er热在这里只有精品66| 欧美人成免费网站| 中文无字幕一区二区三区| 午夜电影一区二区三区| 国产成人一区在线| 欧美人动与zoxxxx乱| 国产精品毛片无遮挡高清| 五月婷婷久久综合| 91在线视频网址| 欧美va亚洲va| 亚洲欧美日韩中文播放| 国模大尺度一区二区三区| 色菇凉天天综合网| 久久久久国产免费免费 | 色综合色狠狠综合色| 欧美一三区三区四区免费在线看 | 亚洲va欧美va国产va天堂影院| 国产麻豆成人精品| 在线不卡中文字幕| 亚洲欧美综合网| 国产毛片一区二区| 这里只有精品视频在线观看| 1000部国产精品成人观看| 麻豆91精品视频| 欧美丝袜第三区| 亚洲欧洲日韩av| 国产91露脸合集magnet| 日韩视频免费观看高清在线视频| 亚洲免费av高清| 成人开心网精品视频| 欧美成人精品3d动漫h| 亚洲主播在线观看| 99综合电影在线视频| 精品成人一区二区| 日本v片在线高清不卡在线观看| 欧美在线一区二区三区| 综合久久久久久| 成人黄色电影在线| 久久久久久久综合| 久久99精品一区二区三区三区| 欧美三级韩国三级日本一级| 亚洲嫩草精品久久| 91免费观看在线| 中文字幕一区三区| 成人一区二区在线观看| 久久精品夜色噜噜亚洲aⅴ| 美女视频一区二区三区| 日韩免费高清电影| 久久99热狠狠色一区二区| 欧美一区二区三区白人| 日韩成人午夜电影| 欧美一区二区三区日韩| 日韩中文字幕91| 666欧美在线视频| 五月综合激情日本mⅴ| 欧美剧情片在线观看| 视频一区在线播放| 91麻豆精品国产自产在线观看一区 | 成人欧美一区二区三区1314| 国产91精品一区二区| 中文字幕+乱码+中文字幕一区| 国产剧情一区二区| 欧美激情一区二区三区在线| 成人久久视频在线观看| 日韩一区中文字幕| 日本丰满少妇一区二区三区| 亚洲精品国产一区二区精华液 | 亚洲主播在线播放| 欧美日韩一区中文字幕| 天天综合网 天天综合色| 欧美二区在线观看| 久久精品国产99| 久久女同精品一区二区| 成人毛片老司机大片| 亚洲男女毛片无遮挡| 欧美日韩免费电影| 免费高清成人在线| 久久免费视频一区| jvid福利写真一区二区三区| 亚洲精品成人悠悠色影视| 欧美日韩亚州综合| 久久成人免费电影| 亚洲国产高清不卡| 欧美最猛性xxxxx直播| 免费高清在线一区| 中文字幕av不卡| 欧美视频一二三区| 久久se这里有精品| 1区2区3区国产精品| 欧美日韩一卡二卡| 激情伊人五月天久久综合| 中文字幕成人网| 欧美视频精品在线观看| 国产在线国偷精品免费看| 国产精品国产自产拍在线| 色先锋资源久久综合| 日韩av成人高清| 国产精品视频看| 91精品国产综合久久久久久漫画 | 国产一区二区电影| 一区二区三区免费网站| 日韩一区二区三区精品视频| 国产xxx精品视频大全| 一区二区三区精品久久久| 日韩精品一区二区三区中文不卡 | 亚洲欧洲另类国产综合| 欧美丰满一区二区免费视频 | 欧美成人vr18sexvr| 懂色av一区二区夜夜嗨| 亚洲18色成人| 国产日韩精品视频一区| 欧美日韩国产色站一区二区三区| 黄网站免费久久| 亚洲一区二区视频在线观看| 精品理论电影在线观看| 在线精品视频一区二区三四| 国内精品久久久久影院一蜜桃| 亚洲精品乱码久久久久久黑人| 精品久久久久久久久久久久久久久 | 亚洲一区国产视频| 欧美—级在线免费片| 3atv一区二区三区| 91免费小视频| 国产精品一区专区| 午夜一区二区三区在线观看| 欧美国产在线观看| 日韩精品一区二区三区四区| 欧美午夜免费电影| 成人sese在线| 国模套图日韩精品一区二区 | 高清shemale亚洲人妖| 日韩有码一区二区三区| 亚洲激情综合网| 国产精品二区一区二区aⅴ污介绍| 精品国产百合女同互慰| 精品婷婷伊人一区三区三| www.亚洲免费av| 国产精品1区2区| 狠狠色综合日日| 日韩不卡免费视频| 亚洲国产综合91精品麻豆| 亚洲婷婷综合色高清在线| 中文字幕乱码一区二区免费| 精品第一国产综合精品aⅴ| 欧美一区二区视频在线观看2020| 在线观看视频一区| 91成人免费电影| 99视频超级精品| 不卡一区二区中文字幕| 国产高清久久久| 国产福利一区二区三区| 国产综合成人久久大片91| 久久电影网站中文字幕| 蜜桃久久久久久久| 日韩av电影天堂| 免费成人在线观看|