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

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

?? portmacro.h

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*This file has been prepared for Doxygen automatic documentation generation.*/
/*! \file *********************************************************************
 *
 * \brief FreeRTOS port header for AVR32 UC3.
 *
 * - Compiler:           IAR EWAVR32
 * - Supported devices:  All AVR32 devices can be used.
 * - AppNote:
 *
 * \author               Atmel Corporation: http://www.atmel.com \n
 *                       Support email: avr32@atmel.com
 *
 *****************************************************************************/

/*
	FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 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.

	Also see http://www.SafeRTOS.com for an IEC 61508 compliant version along
	with commercial development and support options.
	***************************************************************************
*/



#ifndef PORTMACRO_H
#define PORTMACRO_H

/*-----------------------------------------------------------
 * Port specific definitions.
 *
 * The settings in this file configure FreeRTOS correctly for the
 * given hardware and compiler.
 *
 * These settings should not be altered.
 *-----------------------------------------------------------
 */
#include <avr32/iouc3a0512.h>
#include "intc.h"
#include "compiler.h"


/* Type definitions. */
#define portCHAR        char
#define portFLOAT       float
#define portDOUBLE      double
#define portLONG        long
#define portSHORT       short
#define portSTACK_TYPE  unsigned portLONG
#define portBASE_TYPE   portLONG

#define TASK_DELAY_MS(x)   ( (x)        /portTICK_RATE_MS )
#define TASK_DELAY_S(x)    ( (x)*1000   /portTICK_RATE_MS )
#define TASK_DELAY_MIN(x)  ( (x)*60*1000/portTICK_RATE_MS )

#define configTICK_TC_IRQ             ATPASTE2(AVR32_TC_IRQ, configTICK_TC_CHANNEL)

#if( configUSE_16_BIT_TICKS == 1 )
  typedef unsigned portSHORT portTickType;
	#define portMAX_DELAY ( portTickType ) 0xffff
#else
  typedef unsigned portLONG portTickType;
	#define portMAX_DELAY ( portTickType ) 0xffffffff
#endif
/*-----------------------------------------------------------*/

/* Architecture specifics. */
#define portSTACK_GROWTH      ( -1 )
#define portTICK_RATE_MS      ( ( portTickType ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT       4
#define portNOP()             {__asm__ __volatile__ ("nop");}
/*-----------------------------------------------------------*/


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

/* INTC-specific. */
#define DISABLE_ALL_EXCEPTIONS()    Disable_global_exception()
#define ENABLE_ALL_EXCEPTIONS()     Enable_global_exception()

#define DISABLE_ALL_INTERRUPTS()    Disable_global_interrupt()
#define ENABLE_ALL_INTERRUPTS()     Enable_global_interrupt()

#define DISABLE_INT_LEVEL(int_lev)  Disable_interrupt_level(int_lev)
#define ENABLE_INT_LEVEL(int_lev)   Enable_interrupt_level(int_lev)


/*
 * Debug trace.
 * Activated if and only if configDBG is nonzero.
 * Prints a formatted string to stdout.
 * The current source file name and line number are output with a colon before
 * the formatted string.
 * A carriage return and a linefeed are appended to the output.
 * stdout is redirected by Newlib to the USART configured by configDBG_USART.
 * The parameters are the same as for the standard printf function.
 * There is no return value.
 * SHALL NOT BE CALLED FROM WITHIN AN INTERRUPT as fputs and printf use malloc,
 * which is interrupt-unsafe with the current __malloc_lock and __malloc_unlock.
 */
#if configDBG
	#define portDBG_TRACE(...)												\
	{																		\
	  fputs(__FILE__ ":" ASTRINGZ(__LINE__) ": ", stdout);					\
	  printf(__VA_ARGS__);													\
	  fputs("\r\n", stdout);												\
	}
#else
	#define portDBG_TRACE(...)
#endif


/* Critical section management. */
#define portDISABLE_INTERRUPTS()  DISABLE_ALL_INTERRUPTS()
#define portENABLE_INTERRUPTS()   ENABLE_ALL_INTERRUPTS()


extern void vPortEnterCritical( void );
extern void vPortExitCritical( void );

#define portENTER_CRITICAL()      vPortEnterCritical();
#define portEXIT_CRITICAL()       vPortExitCritical();


/* Added as there is no such function in FreeRTOS. */
extern void *pvPortRealloc( void *pv, size_t xSize );
/*-----------------------------------------------------------*/


/*=============================================================================================*/

/*
 * Restore Context for cases other than INTi.
 */
#define portRESTORE_CONTEXT()																\
{																							\
  extern volatile unsigned portLONG ulCriticalNesting;										\
  extern volatile void *volatile pxCurrentTCB;												\
																							\
  __asm__ __volatile__ (																	\
    /* Set SP to point to new stack */														\
    "mov     r8, LWRD("ASTRINGZ(pxCurrentTCB)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")												\n\t"\
    "ld.w    r0, r8[0]																		\n\t"\
    "ld.w    sp, r0[0]																		\n\t"\
																							\
    /* Restore ulCriticalNesting variable */												\
    "ld.w    r0, sp++																		\n\t"\
    "mov     r8, LWRD("ASTRINGZ(ulCriticalNesting)")										\n\t"\
    "orh     r8, HWRD("ASTRINGZ(ulCriticalNesting)")										\n\t"\
    "st.w    r8[0], r0																		\n\t"\
																							\
    /* Restore R0..R7 */																	\
    "ldm     sp++, r0-r7																	\n\t"\
    /* R0-R7 should not be used below this line */											\
    /* Skip PC and SR (will do it at the end) */											\
    "sub     sp, -2*4																		\n\t"\
    /* Restore R8..R12 and LR */															\
    "ldm     sp++, r8-r12, lr																\n\t"\
    /* Restore SR */																		\
    "ld.w    r0, sp[-8*4]																	\n\t" /* R0 is modified, is restored later. */\
    "mtsr    "ASTRINGZ(AVR32_SR)", r0														\n\t"\
    /* Restore r0 */																		\
    "ld.w    r0, sp[-9*4]																	\n\t"\
    /* Restore PC */																		\
    "ld.w    pc, sp[-7*4]" /* Get PC from stack - PC is the 7th register saved */			\
  );																						\
																							\
  /* Force import of global symbols from assembly */										\
  ulCriticalNesting;																		\
  pxCurrentTCB;																				\
}


/*
 * portSAVE_CONTEXT_INT() and portRESTORE_CONTEXT_INT(): for INT0..3 exceptions.
 * portSAVE_CONTEXT_SCALL() and portRESTORE_CONTEXT_SCALL(): for the scall exception.
 *
 * Had to make different versions because registers saved on the system stack
 * are not the same between INT0..3 exceptions and the scall exception.
 */

// Task context stack layout:
  // R8  (*)
  // R9  (*)
  // R10 (*)
  // R11 (*)
  // R12 (*)
  // R14/LR (*)
  // R15/PC (*)
  // SR (*)
  // R0
  // R1
  // R2
  // R3
  // R4
  // R5
  // R6
  // R7
  // ulCriticalNesting
// (*) automatically done for INT0..INT3, but not for SCALL

/*
 * The ISR used for the scheduler tick depends on whether the cooperative or
 * the preemptive scheduler is being used.
 */
#if configUSE_PREEMPTION == 0

/*
 * portSAVE_CONTEXT_OS_INT() for OS Tick exception.
 */
#define portSAVE_CONTEXT_OS_INT()															\
{																							\
  /* Save R0..R7 */																			\
  __asm__ __volatile__ ("stm     --sp, r0-r7");												\
																							\
  /* With the cooperative scheduler, as there is no context switch by interrupt, */			\
  /* there is also no context save. */														\
}

/*
 * portRESTORE_CONTEXT_OS_INT() for Tick exception.
 */
#define portRESTORE_CONTEXT_OS_INT()														\
{																							\
  __asm__ __volatile__ (																	\
    /* Restore R0..R7 */																	\
    "ldm     sp++, r0-r7																	\n\t"\
																							\
    /* With the cooperative scheduler, as there is no context switch by interrupt, */		\
    /* there is also no context restore. */													\
    "rete"																					\
  );																						\
}

#else

/*
 * portSAVE_CONTEXT_OS_INT() for OS Tick exception.
 */
#define portSAVE_CONTEXT_OS_INT()																	\
{																									\
  extern volatile unsigned portLONG ulCriticalNesting;												\
  extern volatile void *volatile pxCurrentTCB;														\
																									\
  /* When we come here */																			\
  /* Registers R8..R12, LR, PC and SR had already been pushed to system stack */					\
																									\
  __asm__ __volatile__ (																			\
    /* Save R0..R7 */																				\
    "stm     --sp, r0-r7																			\n\t"\
																									\
    /* Save ulCriticalNesting variable  - R0 is overwritten */										\
    "mov     r8, LWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "orh     r8, HWRD("ASTRINGZ(ulCriticalNesting)")												\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "st.w    --sp, r0																				\n\t"\
																									\
    /* Check if INT0 or higher were being handled (case where the OS tick interrupted another */	\
    /* interrupt handler (which was of a higher priority level but decided to lower its priority */	\
    /* level and allow other lower interrupt level to occur). */									\
    /* In this case we don't want to do a task switch because we don't know what the stack */		\
    /* currently looks like (we don't know what the interrupted interrupt handler was doing). */	\
    /* Saving SP in pxCurrentTCB and then later restoring it (thinking restoring the task) */		\
    /* will just be restoring the interrupt handler, no way!!! */									\
    /* So, since we won't do a vTaskSwitchContext(), it's of no use to save SP. */					\
    "ld.w    r0, sp[9*4]																			\n\t" /* Read SR in stack */\
    "bfextu  r0, r0, 22, 3																			\n\t" /* Extract the mode bits to R0. */\
    "cp.w    r0, 1																					\n\t" /* Compare the mode bits with supervisor mode(b'001) */\
    "brhi    LABEL_INT_SKIP_SAVE_CONTEXT_"ASTRINGZ(__LINE__)"										\n\t"\
																									\
    /* Store SP in the first member of the structure pointed to by pxCurrentTCB */					\
    /* NOTE: we don't enter a critical section here because all interrupt handlers */				\
    /* MUST perform a SAVE_CONTEXT/RESTORE_CONTEXT in the same way as */							\
    /* portSAVE_CONTEXT_OS_INT/port_RESTORE_CONTEXT_OS_INT if they call OS functions. */			\
    /* => all interrupt handlers must use portENTER_SWITCHING_ISR/portEXIT_SWITCHING_ISR. */		\
    "mov     r8, LWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "orh     r8, HWRD("ASTRINGZ(pxCurrentTCB)")														\n\t"\
    "ld.w    r0, r8[0]																				\n\t"\
    "st.w    r0[0], sp																				\n"\
																									\
    "LABEL_INT_SKIP_SAVE_CONTEXT_"ASTRINGZ(__LINE__)":"												\
  );																								\
}

/*
 * portRESTORE_CONTEXT_OS_INT() for Tick exception.
 */
#define portRESTORE_CONTEXT_OS_INT()																\
{																									\
  extern volatile unsigned portLONG ulCriticalNesting;												\
  extern volatile void *volatile pxCurrentTCB;														\
																									\
  /* Check if INT0 or higher were being handled (case where the OS tick interrupted another */		\
  /* interrupt handler (which was of a higher priority level but decided to lower its priority */	\
  /* level and allow other lower interrupt level to occur). */										\
  /* In this case we don't want to do a task switch because we don't know what the stack */			\
  /* currently looks like (we don't know what the interrupted interrupt handler was doing). */		\
  /* Saving SP in pxCurrentTCB and then later restoring it (thinking restoring the task) */			\
  /* will just be restoring the interrupt handler, no way!!! */										\

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91激情五月电影| 日韩欧美三级在线| 亚洲综合色区另类av| 91麻豆.com| 有码一区二区三区| 欧美午夜精品久久久| 午夜一区二区三区视频| 3atv在线一区二区三区| 蜜桃视频第一区免费观看| 日韩欧美美女一区二区三区| 老色鬼精品视频在线观看播放| 日本欧美一区二区在线观看| 日韩欧美中文字幕制服| 狠狠色丁香婷婷综合| 国产日韩av一区| av成人动漫在线观看| 亚洲黄网站在线观看| 欧美肥大bbwbbw高潮| 久久99精品国产| 国产日韩欧美电影| 91老师片黄在线观看| 性做久久久久久免费观看欧美| 欧美一区二区三区在线看| 精品亚洲成av人在线观看| 久久精品视频在线看| 99re这里只有精品视频首页| 亚洲国产日韩一级| 精品久久久久久亚洲综合网| 粉嫩蜜臀av国产精品网站| 亚洲伦理在线精品| 欧美一级片在线| 丁香一区二区三区| 亚洲图片欧美视频| 裸体健美xxxx欧美裸体表演| 欧美国产亚洲另类动漫| 在线观看精品一区| 久久草av在线| 亚洲欧美综合色| 777亚洲妇女| 国产成人av影院| 亚洲一区二区三区四区在线观看 | 精品福利一区二区三区免费视频| 国产在线精品国自产拍免费| 亚洲三级在线播放| 欧美一级理论片| va亚洲va日韩不卡在线观看| 天堂av在线一区| 国产日产欧美一区二区视频| 欧美日韩专区在线| 国产精品一区一区三区| 亚洲自拍欧美精品| 久久久国际精品| 欧美三级欧美一级| 国产91丝袜在线播放| 午夜久久久久久久久久一区二区| 久久久精品免费网站| 欧美日韩在线精品一区二区三区激情| 精久久久久久久久久久| 亚洲精品国产一区二区三区四区在线| 青青草成人在线观看| 国产精品精品国产色婷婷| 91精品国产aⅴ一区二区| 不卡一区二区在线| 麻豆视频一区二区| 亚洲乱码国产乱码精品精98午夜| 精品国产一区二区国模嫣然| 日本伦理一区二区| 国产精品99久久久久| 天堂午夜影视日韩欧美一区二区| 国产精品三级视频| 欧美成人bangbros| 欧美色图一区二区三区| 成人免费毛片aaaaa**| 日本视频一区二区三区| 一区二区在线观看视频在线观看| 久久久精品蜜桃| 91精品国产aⅴ一区二区| 在线观看日韩av先锋影音电影院| 国产成人午夜精品5599| 免费一级欧美片在线观看| 一区二区三区在线视频播放| 中文字幕不卡三区| 久久影院视频免费| 日韩不卡手机在线v区| 亚洲视频在线一区二区| 国产日韩欧美制服另类| 日韩一区二区三区电影在线观看 | 国产成人在线视频网址| 日本不卡视频在线| 亚洲综合一区二区三区| 国产精品国产三级国产a| 久久综合九色综合久久久精品综合| 欧美日韩1234| 91精品福利在线| 99re成人精品视频| 成人午夜视频在线观看| 国产精品一区二区久激情瑜伽| 欧美aaaaaa午夜精品| 亚洲444eee在线观看| 一区二区三区视频在线看| 中文字幕在线一区免费| 亚洲国产激情av| 久久一区二区视频| 欧美mv日韩mv国产| 欧美岛国在线观看| 日韩三区在线观看| 日韩一区二区免费在线电影| 午夜精品福利一区二区蜜股av | 亚洲国产高清不卡| 久久久久久麻豆| 久久一夜天堂av一区二区三区| 精品免费日韩av| 日韩视频一区在线观看| 91精品欧美一区二区三区综合在| 欧美日韩大陆一区二区| 欧美日韩精品电影| 欧美群妇大交群中文字幕| 欧美日韩亚洲综合一区| 欧美精品少妇一区二区三区| 欧美日本国产一区| 欧美一区二区视频在线观看| 欧美一级久久久久久久大片| 日韩一区二区不卡| 日韩美一区二区三区| 精品久久久网站| 久久女同精品一区二区| 久久久精品日韩欧美| 欧美国产日产图区| 国产精品久久99| 亚洲人成人一区二区在线观看| 亚洲人成7777| 欧美理论电影在线| 91精品国产一区二区三区蜜臀| 日韩亚洲欧美在线| 亚洲精品在线观| 国产女同互慰高潮91漫画| 国产精品久久久久桃色tv| 亚洲天堂网中文字| 亚洲一二三区在线观看| 午夜国产精品一区| 另类综合日韩欧美亚洲| 国产风韵犹存在线视精品| 成人黄色777网| 91国产视频在线观看| 欧美日韩精品一区二区天天拍小说| 欧美精品亚洲一区二区在线播放| 日韩美女视频在线| 国产日产欧美一区| 亚洲人成网站色在线观看| 婷婷六月综合亚洲| 国产一区二区三区香蕉| 成人av在线一区二区三区| 91久久精品国产91性色tv| 7777精品伊人久久久大香线蕉超级流畅 | 欧美日韩一二三区| 欧美变态tickle挠乳网站| 国产午夜亚洲精品不卡| 亚洲欧美另类久久久精品2019| 亚洲成a人在线观看| 黑人巨大精品欧美黑白配亚洲| 国产精品免费视频一区| 亚洲激情中文1区| 欧美96一区二区免费视频| 国产精品香蕉一区二区三区| 日本精品一级二级| 欧美一区二区三区免费在线看| 成人黄色小视频在线观看| 婷婷成人激情在线网| 麻豆精品视频在线观看| 成人av免费在线观看| 欧美日韩午夜影院| 26uuu另类欧美| 亚洲欧美日韩久久精品| 日韩国产精品久久久| 国产高清成人在线| 在线观看一区二区视频| 精品久久久久一区二区国产| 日韩久久一区二区| 美女在线观看视频一区二区| a在线欧美一区| 91精品国产综合久久精品麻豆| 国产片一区二区| 亚洲成人精品一区| 国产精品亚洲视频| 欧美人妇做爰xxxⅹ性高电影| 国产日韩欧美激情| 天堂av在线一区| 国产精品另类一区| 免费三级欧美电影| 91香蕉视频黄| 精品国产欧美一区二区| 一区二区三区不卡在线观看 | 欧美精品在欧美一区二区少妇| 国产亚洲一二三区| 天天色 色综合| av电影一区二区| 精品处破学生在线二十三| 亚洲一二三四久久| 成人动漫在线一区| 精品久久久久久久久久久久包黑料|