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

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

?? port.c

?? STM32 FreeRTOS v5.2移植源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
	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.
*/

#include "FreeRTOS.h"
#include "task.h"

/*-----------------------------------------------------------
 * Implementation of functions defined in portable.h for the 16FX port.
 *----------------------------------------------------------*/

/* 
 * Get current value of DPR and ADB registers 
 */
portSTACK_TYPE xGet_DPR_ADB_bank( void ); 

/* 
 * Get current value of DTB and PCB registers 
 */
portSTACK_TYPE xGet_DTB_PCB_bank( void );

/*
 * Sets up the periodic ISR used for the RTOS tick.  This uses RLT0, but
 * can be done using any given RLT.
 */
static void prvSetupRLT0Interrupt( void );

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

/* 
 * We require the address of the pxCurrentTCB variable, but don't want to know
 * any details of its type. 
 */
typedef void tskTCB;
extern volatile tskTCB * volatile pxCurrentTCB;

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

/* 
 * Macro to save a task context to the task stack. This macro  copies the 
 * saved context (AH:AL, DPR:ADB, DTB:PCB , PC and PS) from  the   system 
 * stack to task stack pointed by user stack pointer ( USP  for SMALL and 
 * MEDIUM memory model amd USB:USP for COMPACT  and LARGE memory model ),
 * then  it pushes the general purpose registers RW0-RW7  on  to the task 
 * stack. Finally the  resultant  stack  pointer  value is saved into the 
 * task  control  block  so  it  can  be retrieved the next time the task 
 * executes.
 */ 
#if( ( configMEMMODEL == portSMALL ) || ( configMEMMODEL == portMEDIUM ) )

	#define portSAVE_CONTEXT()											\
			{	__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
	    		__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" PUSHW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) ");		\
				__asm(" MOVW A, _pxCurrentTCB ");						\
				__asm(" MOVW A, SP ");									\
  				__asm(" SWAPW ");										\
				__asm(" MOVW @AL, AH ");								\
				__asm(" OR   CCR,#H'20 ");								\
			}

/* 
 * Macro to restore a task context from the task stack.  This is effecti-
 * vely the reverse of SAVE_CONTEXT(). First the stack pointer  value
 * (USP for SMALL and MEDIUM memory model amd  USB:USP  for  COMPACT  and 
 * LARGE memory model ) is loaded from the task  control block.  Next the 
 * value of all the general purpose registers RW0-RW7 is retrieved. Fina-
 * lly it copies of the context ( AH:AL,  DPR:ADB, DTB:PCB, PC and PS) of 
 * the task to be executed upon RETI from user stack to system stack.  
 */
 
	#define portRESTORE_CONTEXT()										\
			{	__asm(" MOVW A, _pxCurrentTCB ");						\
				__asm(" MOVW A, @A ");									\
  				__asm(" AND  CCR,#H'DF ");  							\
  				__asm(" MOVW SP, A ");									\
				__asm(" POPW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) ");		\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
			}
		
#elif( ( configMEMMODEL == portCOMPACT ) || ( configMEMMODEL == portLARGE ) )

	#define portSAVE_CONTEXT()											\
			{	__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
	    		__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" POPW  A ");										\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" PUSHW  A ");									\
				__asm(" PUSHW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) ");		\
				__asm(" MOVL A, _pxCurrentTCB ");						\
				__asm(" MOVL RL2, A ");									\
				__asm(" MOVW A, SP ");									\
				__asm(" MOVW @RL2+0, A ");								\
				__asm(" MOV A, USB ");									\
				__asm(" MOV @RL2+2, A ");								\
			}	
            
	#define portRESTORE_CONTEXT()										\
			{	__asm(" MOVL A, _pxCurrentTCB ");						\
				__asm(" MOVL RL2, A ");									\
				__asm(" MOVW A, @RL2+0 ");								\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" MOVW SP, A ");									\
				__asm(" MOV A, @RL2+2 ");								\
				__asm(" MOV USB, A ");									\
				__asm(" POPW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) ");		\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
				__asm(" AND  CCR,#H'DF ");  							\
				__asm(" POPW  A ");										\
				__asm(" OR   CCR,#H'20 ");								\
				__asm(" PUSHW  A ");									\
			}
#endif

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

/* 
 * Functions for obtaining the current value  of  DPR:ADB, DTB:PCB bank registers
 */
 
#pragma asm

        .GLOBAL    _xGet_DPR_ADB_bank
        .GLOBAL    _xGet_DTB_PCB_bank
        .SECTION   CODE, CODE, ALIGN=1

_xGet_DPR_ADB_bank:

    MOV A, DPR
    SWAP
    MOV A, ADB
    ORW A
	#if configMEMMODEL == portMEDIUM || configMEMMODEL == portLARGE
		RETP
	#elif configMEMMODEL == portSMALL || configMEMMODEL == portCOMPACT   
		RET
	#endif 


_xGet_DTB_PCB_bank:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久精品人人澡人人爽| 色婷婷精品久久二区二区蜜臀av| 国产乱码精品一区二区三区五月婷| 成人国产精品免费观看动漫| 欧美狂野另类xxxxoooo| 成人精品电影在线观看| 三级久久三级久久久| 亚洲一区二区精品久久av| 亚洲v中文字幕| 日韩av不卡在线观看| 久草精品在线观看| 国产乱码精品一区二区三| 国产99久久久久久免费看农村| 国产麻豆视频一区| 99久久精品免费看国产 | 欧美影院一区二区| 欧美日韩免费高清一区色橹橹 | 欧美一级xxx| 精品久久人人做人人爱| 国产日产欧产精品推荐色 | 亚洲综合色视频| 午夜久久久久久久久久一区二区| 奇米色一区二区| 国产在线精品一区二区不卡了 | 丝袜美腿亚洲综合| 国内久久精品视频| 一本色道久久综合精品竹菊| 制服丝袜日韩国产| 国产欧美精品日韩区二区麻豆天美| 一区在线观看视频| 日韩av中文字幕一区二区三区| 国产一区二区电影| 欧美午夜精品一区二区蜜桃| 欧美精品一区二区三区蜜桃| 国产精品久久毛片av大全日韩| 亚洲国产另类精品专区| 国产福利91精品一区二区三区| 91国产免费观看| 欧美精品一区二区不卡| 亚洲综合男人的天堂| 国产精品一区在线观看你懂的| 欧美在线free| 久久综合九色综合欧美98 | 三级久久三级久久| 成人免费高清视频在线观看| 欧美顶级少妇做爰| 中文字幕一区在线| 国产一区二区精品久久91| 欧美日韩卡一卡二| 亚洲精品中文字幕乱码三区| 国产精品一区二区三区网站| 欧美另类久久久品| 亚洲三级电影网站| 国v精品久久久网| 欧美大片在线观看一区二区| 一片黄亚洲嫩模| jlzzjlzz欧美大全| 国产亚洲美州欧州综合国| 日本欧美一区二区| 欧美视频一二三区| 一区二区三区在线视频观看58 | 亚洲欧洲av在线| 国产精品一品视频| 精品福利在线导航| 秋霞电影一区二区| 欧美一区二区在线免费播放| 亚洲综合在线第一页| 色久综合一二码| 自拍av一区二区三区| 99综合影院在线| 中文字幕一区视频| 91美女片黄在线观看| 亚洲婷婷综合色高清在线| 99久久久久久| 亚洲私人黄色宅男| 在线免费观看成人短视频| 亚洲欧美成人一区二区三区| 91视频国产资源| 一区二区三区资源| 欧美日韩国产乱码电影| 香蕉av福利精品导航| 3751色影院一区二区三区| 美女一区二区久久| 精品国产a毛片| 成人毛片老司机大片| 国产精品久久免费看| 色婷婷久久久综合中文字幕| 亚洲人成影院在线观看| 欧美一区二区女人| 男女性色大片免费观看一区二区 | 亚洲免费观看高清完整版在线观看熊| 国产精品456| 亚洲色图一区二区三区| 欧美日韩在线不卡| 另类人妖一区二区av| 国产三级精品三级| 91电影在线观看| 日韩av成人高清| 国产欧美日产一区| 欧美综合欧美视频| 久久精品国产在热久久| 久久精品一区二区| 欧美性xxxxxxxx| 黄色精品一二区| 亚洲天堂免费在线观看视频| 欧美日韩久久久| 国产盗摄精品一区二区三区在线| 欧美日韩国产首页| 粉嫩高潮美女一区二区三区| 国产精品一二三区在线| 国内精品国产成人国产三级粉色| 美女一区二区久久| 久久国产夜色精品鲁鲁99| 日本免费在线视频不卡一不卡二 | 日本欧美在线观看| 天天做天天摸天天爽国产一区| 亚洲一区二区三区四区在线观看 | 亚洲欧洲另类国产综合| 国产精品私人自拍| 中文字幕中文字幕中文字幕亚洲无线| 亚洲精品在线观看网站| 精品国产凹凸成av人导航| 欧美成人精品高清在线播放| 欧美精品一区二区三区蜜臀| 久久久三级国产网站| 中文字幕欧美区| 亚洲欧美一区二区三区极速播放 | 国产亚洲一区二区三区在线观看| 久久久另类综合| 欧美韩日一区二区三区四区| 中文字幕高清一区| 亚洲美女一区二区三区| 亚洲成av人片在www色猫咪| 日韩精品一二区| 欧美色成人综合| 风间由美一区二区三区在线观看 | 国产精品一区久久久久| 日本在线不卡一区| 亚洲自拍偷拍网站| 国产精品久久久久婷婷| 亚洲精品一区二区三区香蕉| 欧美日韩在线播| 色吧成人激情小说| 不卡的av中国片| 国产成人av影院| 国产一区二区三区四区五区美女| 午夜视频在线观看一区二区三区| 亚洲免费在线视频一区 二区| 欧美国产精品一区二区| 久久精品在线观看| 26uuu精品一区二区| 精品卡一卡二卡三卡四在线| 日韩欧美一区二区不卡| 日韩亚洲欧美在线观看| 欧美一级高清片| 欧美成人官网二区| www日韩大片| 日本一区二区视频在线| 中文字幕一区二区三区在线播放| 日韩理论片中文av| 一区二区免费在线播放| 天天亚洲美女在线视频| 日本不卡在线视频| 久久99国产精品免费网站| 久久精品72免费观看| 国产在线精品一区二区| 成人午夜视频福利| 91视视频在线观看入口直接观看www | 93久久精品日日躁夜夜躁欧美| 不卡一卡二卡三乱码免费网站| 99久久99久久久精品齐齐| 色欧美片视频在线观看| 3atv一区二区三区| 国产婷婷色一区二区三区四区| 国产精品高清亚洲| 亚洲成人自拍偷拍| 精品系列免费在线观看| yourporn久久国产精品| 欧美中文字幕久久| 精品va天堂亚洲国产| 中文字幕一区视频| 亚洲大片免费看| 国产99精品在线观看| 欧美日韩中文一区| 久久精品亚洲精品国产欧美kt∨| 最新国产の精品合集bt伙计| 无码av免费一区二区三区试看| 国产精品亚洲第一区在线暖暖韩国| 99久久国产综合精品色伊| 日韩一区二区电影网| 国产精品久久久久久久久图文区| 午夜精品福利一区二区蜜股av | 国产精品视频在线看| 亚洲香肠在线观看| 国产成人免费网站| 91精品国产综合久久精品图片| 欧美国产一区在线| 日本系列欧美系列| 色婷婷国产精品综合在线观看| 精品国产百合女同互慰|