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

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

?? portmacro.h

?? FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
?? H
?? 第 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.
*/


#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/io.h>
#include "intc.h"
#include "compiler.h"

#ifdef __cplusplus
extern "C" {
#endif


/* 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 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, LO(%[pxCurrentTCB])													\n\t"\
    "orh     r8, HI(%[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, LO(%[ulCriticalNesting])												\n\t"\
    "orh     r8, HI(%[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    %[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 */		\
    :																					\
    : [ulCriticalNesting] "i" (&ulCriticalNesting),										\
      [pxCurrentTCB] "i" (&pxCurrentTCB),												\
      [SR] "i" (AVR32_SR)																\
  );																					\
}


/*
 * 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, LO(%[ulCriticalNesting])\n\t"														\
    "orh     r8, HI(%[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_%[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, LO(%[pxCurrentTCB])\n\t"															\
    "orh     r8, HI(%[pxCurrentTCB])\n\t"															\
    "ld.w    r0, r8[0]\n\t"																			\
    "st.w    r0[0], sp\n"																			\
																									\
    "LABEL_INT_SKIP_SAVE_CONTEXT_%[LINE]:"															\
    :																								\
    : [ulCriticalNesting] "i" (&ulCriticalNesting),													\
      [pxCurrentTCB] "i" (&pxCurrentTCB),															\
      [LINE] "i" (__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 */	\

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产高清aⅴ视频| 日韩国产欧美在线播放| 欧美一区二区三级| 欧美一区二区三区在线观看视频| 国产成人8x视频一区二区 | 国产91精品一区二区| 久久成人久久鬼色| 久久99国内精品| 国产真实乱对白精彩久久| 久久精品国产99| 国产在线不卡一卡二卡三卡四卡| 久久国产麻豆精品| 国产激情视频一区二区在线观看 | 欧美日韩成人激情| 欧美顶级少妇做爰| 2020国产精品久久精品美国| 久久久久久久久免费| 中文字幕永久在线不卡| 亚洲国产欧美在线| 麻豆精品视频在线观看| 国产成人免费高清| 欧美亚洲一区二区在线| 日韩欧美高清在线| 国产精品国产三级国产| 亚洲国产你懂的| 精品在线一区二区三区| 95精品视频在线| 91精品一区二区三区久久久久久| 久久一区二区三区四区| 亚洲品质自拍视频网站| 麻豆精品一二三| 日本伦理一区二区| 337p粉嫩大胆噜噜噜噜噜91av| 一区在线观看免费| 奇米在线7777在线精品| jiyouzz国产精品久久| 91麻豆精品国产91久久久| 国产日韩欧美精品在线| 亚洲一级不卡视频| 成人综合在线网站| 日韩亚洲欧美一区二区三区| 国产精品久久三| 美洲天堂一区二卡三卡四卡视频| 欧美私模裸体表演在线观看| 精品欧美一区二区久久| 亚洲精品大片www| 国产成人精品午夜视频免费| 欧美日韩精品一区二区在线播放| 国产亚洲一本大道中文在线| 婷婷久久综合九色综合绿巨人| 成人深夜在线观看| wwwwxxxxx欧美| 石原莉奈在线亚洲二区| 在线观看日韩国产| 日本一区二区电影| 国产一区二区三区精品欧美日韩一区二区三区 | 激情五月播播久久久精品| 91麻豆精东视频| 国产精品网曝门| 国产毛片精品国产一区二区三区| 欧美精品视频www在线观看| 亚洲素人一区二区| 不卡的av中国片| 亚洲国产高清不卡| 成人免费视频视频| 国产欧美日韩激情| 高清久久久久久| 日本一区二区三区久久久久久久久不 | 色婷婷精品大视频在线蜜桃视频| 久久免费的精品国产v∧| 精品一区二区三区在线播放| 555www色欧美视频| 免费在线观看成人| 欧美大片国产精品| 精品一区二区免费看| 精品国产百合女同互慰| 久久超碰97中文字幕| 精品噜噜噜噜久久久久久久久试看| 日韩精品国产欧美| 欧美成人精品二区三区99精品| 蜜桃一区二区三区四区| 久久综合中文字幕| 在线精品观看国产| 亚洲成人综合网站| 欧美日韩免费一区二区三区视频| 午夜精品久久久久久久久久| 欧美精品一级二级三级| 美国十次了思思久久精品导航| 欧美v亚洲v综合ⅴ国产v| 国产一区二区在线电影| 国产精品人成在线观看免费| 色综合夜色一区| 日日欢夜夜爽一区| www激情久久| 色婷婷久久久久swag精品| 偷偷要91色婷婷| 久久久天堂av| 欧美伊人久久久久久午夜久久久久| 亚洲国产欧美在线| 久久久综合激的五月天| 99久久99久久久精品齐齐| 偷拍日韩校园综合在线| 2024国产精品视频| 日本道免费精品一区二区三区| 午夜久久久久久电影| 久久婷婷成人综合色| 日本高清成人免费播放| 玖玖九九国产精品| 中文字幕制服丝袜成人av| 欧美日韩国产小视频在线观看| 韩国欧美国产1区| 亚洲在线视频网站| 国产偷国产偷亚洲高清人白洁| 色综合av在线| 国产乱子伦视频一区二区三区 | 国产精品99久| 亚洲福中文字幕伊人影院| 久久久另类综合| 欧美巨大另类极品videosbest | 欧美一区二区三区免费观看视频 | 欧美午夜精品久久久久久孕妇| 国产一区在线不卡| 日韩在线一区二区| 亚洲天堂久久久久久久| 久久精品视频一区二区三区| 欧美日韩视频在线观看一区二区三区| 韩国一区二区视频| 久久精品国产在热久久| 一区二区三区在线观看网站| 久久日一线二线三线suv| 欧美日韩免费不卡视频一区二区三区| 成人综合在线网站| 极品美女销魂一区二区三区免费| 亚洲国产日韩一级| 亚洲人成精品久久久久久| 欧美中文字幕一二三区视频| 成av人片一区二区| 国产成人精品亚洲午夜麻豆| 精品一区二区三区在线观看国产| 亚洲成人av电影在线| 亚洲自拍与偷拍| 亚洲日本在线天堂| 日韩一区欧美小说| 中文一区在线播放| 中文字幕 久热精品 视频在线| 2020国产精品自拍| 国产视频一区在线播放| 久久一区二区视频| 国产午夜精品久久久久久免费视| 欧美精品一区男女天堂| 精品国产伦一区二区三区免费| 日韩美一区二区三区| 日韩精品一区二区三区视频在线观看 | 国产日韩欧美电影| 国产精品人成在线观看免费| 中文字幕久久午夜不卡| 国产精品欧美一区二区三区| 亚洲国产精品av| 中文字幕在线观看不卡视频| 亚洲私人影院在线观看| 亚洲图片自拍偷拍| 男人的天堂亚洲一区| 国产一区二区三区综合| 国产精品一区二区久久不卡| 懂色av噜噜一区二区三区av| 成人av电影免费观看| 一本色道久久综合精品竹菊| 欧美三级欧美一级| 91精品国产91热久久久做人人 | 国产精品乱人伦中文| 亚洲欧美一区二区不卡| 午夜欧美一区二区三区在线播放| 免费欧美在线视频| 豆国产96在线|亚洲| 在线精品亚洲一区二区不卡| 宅男噜噜噜66一区二区66| 精品粉嫩超白一线天av| 国产精品美女久久久久久| 亚洲国产一区二区三区青草影视| 爽爽淫人综合网网站| 一本一道久久a久久精品| 欧美日韩成人综合在线一区二区 | 成人中文字幕电影| 色狠狠桃花综合| 日韩精品影音先锋| 亚洲欧美一区二区在线观看| 日本欧洲一区二区| a美女胸又www黄视频久久| 欧美美女直播网站| 国产精品免费久久久久| 五月婷婷色综合| 成人av免费观看| 欧美大片在线观看一区二区| 自拍偷拍欧美激情| 精品在线观看视频| 欧美日韩免费视频| 亚洲欧洲在线观看av| 久久av老司机精品网站导航| 色综合天天视频在线观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av |