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

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

?? serialisr.c

?? MCS-51的一個Free小型操作系統,在KeilC中下編譯工作
?? C
字號:
/*
	FreeRTOS.org V4.1.3 - Copyright (C) 2003-2006 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.
	***************************************************************************
*/


/* 
	BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0. 

	This file contains all the serial port components that must be compiled
	to ARM mode.  The components that can be compiled to either ARM or THUMB
	mode are contained in serial.c.
*/

/* This file must always be compiled to ARM mode as it contains ISR 
definitions. */
#pragma ARM

/* Standard includes. */
#include <stdlib.h>

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

/* Demo application includes. */
#include "serial.h"

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

/* Constant to access the VIC. */
#define serCLEAR_VIC_INTERRUPT			( ( unsigned portLONG ) 0 )

/* Constants to determine the ISR source. */
#define serSOURCE_THRE					( ( unsigned portCHAR ) 0x02 )
#define serSOURCE_RX_TIMEOUT			( ( unsigned portCHAR ) 0x0c )
#define serSOURCE_ERROR					( ( unsigned portCHAR ) 0x06 )
#define serSOURCE_RX					( ( unsigned portCHAR ) 0x04 )
#define serINTERRUPT_SOURCE_MASK		( ( unsigned portCHAR ) 0x0f )

/* Queues used to hold received characters, and characters waiting to be
transmitted. */
static xQueueHandle xRxedChars; 
static xQueueHandle xCharsForTx; 
static volatile portLONG lTHREEmpty;

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

/* UART0 interrupt service routine.  This can cause a context switch so MUST
be declared "naked". */
void vUART_ISR( void );

/*-----------------------------------------------------------*/
void vSerialISRCreateQueues(	unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, 
								xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag )
{
	/* Create the queues used to hold Rx and Tx characters. */
	xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
	xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );

	/* Pass back a reference to the queues so the serial API file can 
	post/receive characters. */
	*pxRxedChars = xRxedChars;
	*pxCharsForTx = xCharsForTx;

	/* Initialise the THRE empty flag - and pass back a reference. */
	lTHREEmpty = pdTRUE;
	*pplTHREEmptyFlag = &lTHREEmpty;
}
/*-----------------------------------------------------------*/

void vUART_ISR( void ) __task
{
	portENTER_SWITCHING_ISR()

	/* Now we can declare the local variables. */
	static signed portCHAR cChar;
	static portBASE_TYPE xTaskWokenByRx, xTaskWokenByTx;

	xTaskWokenByTx = pdFALSE;
	xTaskWokenByRx = pdFALSE;

	/* What caused the interrupt? */
	switch( U0IIR & serINTERRUPT_SOURCE_MASK )
	{
		case serSOURCE_ERROR :	/* Not handling this, but clear the interrupt. */
								cChar = U0LSR;
								break;

		case serSOURCE_THRE	:	/* The THRE is empty.  If there is another
								character in the Tx queue, send it now. */
								if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
								{
									U0THR = cChar;
								}
								else
								{
									/* There are no further characters 
									queued to send so we can indicate 
									that the THRE is available. */
									lTHREEmpty = pdTRUE;
								}
								break;

		case serSOURCE_RX_TIMEOUT :
		case serSOURCE_RX	:	/* A character was received.  Place it in 
								the queue of received characters. */
								cChar = U0RBR;
								if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
								{
									xTaskWokenByRx = pdTRUE;
								}
								break;

		default				:	/* There is nothing to do, leave the ISR. */
								break;
	}

	/* Clear the ISR in the VIC. */
	VICVectAddr = serCLEAR_VIC_INTERRUPT;

	/* Exit the ISR.  If a task was woken by either a character being received
	or transmitted then a context switch will occur. */
	portEXIT_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
}
/*-----------------------------------------------------------*/





	

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲最大成人综合| 尤物在线观看一区| 免费高清成人在线| 欧美一级在线免费| 久久99蜜桃精品| 国产日韩影视精品| 色综合天天在线| 偷窥少妇高潮呻吟av久久免费 | 成人精品gif动图一区| 中文字幕亚洲区| 欧美日韩的一区二区| 精久久久久久久久久久| 日本一区免费视频| 色老综合老女人久久久| 五月综合激情日本mⅴ| 久久久综合视频| 在线亚洲高清视频| 国内一区二区在线| 一区二区三区欧美日韩| 精品久久久三级丝袜| www.欧美日韩| 日韩经典中文字幕一区| 欧美国产一区二区| 欧美三级欧美一级| 风间由美一区二区三区在线观看 | 久草中文综合在线| 国产精品久久久久四虎| 欧美在线免费播放| 国产一区二区成人久久免费影院 | 国产成人一区在线| 亚洲高清三级视频| 国产精品视频线看| 欧美另类高清zo欧美| 国产福利一区在线观看| 一区二区三区四区亚洲| 精品福利一区二区三区| 色域天天综合网| 国产乱妇无码大片在线观看| 亚洲不卡av一区二区三区| 26uuu成人网一区二区三区| 91福利视频在线| 国产精品一卡二卡| 五月天网站亚洲| 亚洲日本电影在线| 国产日韩欧美综合在线| 欧美日本在线观看| 色成年激情久久综合| 国产精品一区一区| 男人的j进女人的j一区| 亚洲精品第一国产综合野| 国产午夜精品久久久久久久| 在线播放一区二区三区| 欧美专区在线观看一区| a美女胸又www黄视频久久| 欧美日韩在线免费视频| 成人自拍视频在线| 久久99热99| 男女男精品网站| 三级成人在线视频| 亚洲一二三级电影| 樱花草国产18久久久久| 成人免费在线观看入口| 国产欧美日韩精品a在线观看| 日韩欧美aaaaaa| 日韩一区二区三区在线| 欧美日本在线观看| 欧美日韩精品一区二区三区四区 | 丝袜美腿亚洲一区二区图片| 亚洲精品久久嫩草网站秘色| 国产精品久久久99| 国产精品你懂的在线欣赏| 久久久亚洲精品石原莉奈| 2021国产精品久久精品| 精品国产麻豆免费人成网站| 日韩免费一区二区| 日韩欧美国产综合| 欧美一区二区高清| 日韩免费福利电影在线观看| 日韩欧美123| 精品日韩一区二区| 国产婷婷色一区二区三区在线| 久久综合九色综合欧美98| 精品噜噜噜噜久久久久久久久试看 | 日韩区在线观看| 日韩视频一区二区在线观看| 日韩免费高清av| 久久先锋影音av鲁色资源 | 国产欧美日韩综合| 国产日产欧美一区二区三区| 亚洲国产精品精华液2区45| 国产精品视频一区二区三区不卡| 一区二区中文字幕在线| 亚洲视频图片小说| 午夜在线成人av| 日本不卡中文字幕| 国产精品中文有码| 成人性生交大合| 色综合天天综合色综合av| 精品视频999| 久久久久久久综合狠狠综合| 久久久夜色精品亚洲| 国产精品九色蝌蚪自拍| 亚洲精品少妇30p| 另类小说图片综合网| 国产91综合一区在线观看| 91色乱码一区二区三区| 欧美精选午夜久久久乱码6080| 久久综合九色综合欧美就去吻| 18成人在线视频| 视频一区中文字幕| 国产成人精品影视| 精品视频一区 二区 三区| 亚洲人妖av一区二区| 日韩精品91亚洲二区在线观看| 国产九色sp调教91| 欧美怡红院视频| 国产三级一区二区| 亚洲国产cao| 成人免费毛片片v| 欧美丰满少妇xxxxx高潮对白| 国产欧美精品一区二区色综合| 午夜精品久久久久久久99水蜜桃 | 91在线你懂得| 日韩视频一区在线观看| 亚洲视频1区2区| 国内精品在线播放| 欧美日韩免费电影| 中文在线资源观看网站视频免费不卡| 亚洲电影一区二区三区| 成人免费视频一区| 精品少妇一区二区| 偷拍亚洲欧洲综合| 91麻豆国产福利在线观看| 久久亚洲二区三区| 秋霞影院一区二区| 欧美日韩中文国产| 亚洲三级在线看| 国产精品一区二区不卡| 日韩午夜av一区| 亚洲成在线观看| 色天使色偷偷av一区二区| 久久久99精品免费观看不卡| 免费精品视频最新在线| 91福利国产精品| 亚洲特级片在线| 国产 欧美在线| 久久精子c满五个校花| 麻豆国产精品官网| 91精品国产91久久综合桃花 | 国产高清亚洲一区| 欧美精品一区二区高清在线观看| 亚洲国产精品一区二区久久恐怖片| 成人精品视频一区二区三区 | 中文字幕一区二区日韩精品绯色| 国模冰冰炮一区二区| 欧美一区二区三区公司| 午夜精品一区二区三区免费视频| av电影天堂一区二区在线 | 亚洲制服丝袜在线| 一本久道久久综合中文字幕| 国产精品美女久久久久久| 国产一区二区在线视频| 精品欧美一区二区久久| 青青草国产成人99久久| 日韩一卡二卡三卡四卡| 日日嗨av一区二区三区四区| 777午夜精品视频在线播放| 亚洲高清免费在线| 538prom精品视频线放| 婷婷成人激情在线网| 91.xcao| 久久er99热精品一区二区| 欧美xxxx老人做受| 国产在线播精品第三| 久久夜色精品国产噜噜av| 国产一区二区在线视频| 国产人妖乱国产精品人妖| 国产精品亚洲一区二区三区在线 | 欧美日韩中文国产| 天天综合天天做天天综合| 91精品在线免费| 久久电影国产免费久久电影| 精品国产电影一区二区| 国产一区二区三区在线观看免费视频 | 亚洲欧美在线高清| 一本一道久久a久久精品综合蜜臀| 亚洲天堂精品在线观看| 欧美天堂一区二区三区| 美女免费视频一区二区| 国产日韩综合av| 91麻豆国产精品久久| 日本中文字幕一区| 国产午夜精品在线观看| 日本精品视频一区二区| 日本美女一区二区三区视频| 久久久亚洲高清| 欧美中文字幕不卡| 久久机这里只有精品| 中文字幕日韩精品一区| 欧美一区二区不卡视频|