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

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

?? main.c

?? FreeRTOS source code as bundled with the book "Using FreeRTOS Real-Time Kernel - A Practical Approac
?? C
字號:
/*
	FreeRTOS.org V5.0.4 - Copyright (C) 2003-2008 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.

    ***************************************************************************
    ***************************************************************************
    *                                                                         *
    * SAVE TIME AND MONEY!  We can port FreeRTOS.org to your own hardware,    *
    * and even write all or part of your application on your behalf.          *
    * See http://www.OpenRTOS.com for details of the services we provide to   *
    * expedite your project.                                                  *
    *                                                                         *
    ***************************************************************************
    ***************************************************************************

	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.
*/

/* FreeRTOS.org includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"

/* Compiler includes. */
#include <stdlib.h>
#include <stdio.h>

/* The task that sends messages to the stdio gatekeeper.  Two instances of this 
task are created. */
static void prvPrintTask( void *pvParameters );

/* The gatekeeper task itself. */
static void prvStdioGatekeeperTask( void *pvParameters );

/* Define the strings that the tasks and interrupt will print out via the gatekeeper. */
static char *pcStringsToPrint[] =
{
	"Task 1 ****************************************************\r\n",
	"Task 2 ----------------------------------------------------\r\n",
	"Message printed from the tick hook interrupt ##############\r\n"
};

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

/* Declare a variable of type xQueueHandle.  This is used to send messages from
the print tasks to the gatekeeper task. */
xQueueHandle xPrintQueue;


int main( void )
{
    /* Before a queue is used it must be explicitly created.  The queue is created
	to hold a maximum of 5 character pointers. */
    xPrintQueue = xQueueCreate( 5, sizeof( char * ) );

	/* The tasks are going to use a pseudo random delay, seed the random number
	generator. */
	srand( 567 );

	/* Check the queue was created successfully. */
	if( xPrintQueue != NULL )
	{
		/* Create two instances of the tasks that send messages to the gatekeeper.
		The	index to the string they attempt to write is passed in as the task 
		parameter (4th parameter to xTaskCreate()).  The tasks are created at 
		different priorities so some pre-emption will occur. */
		xTaskCreate( prvPrintTask, "Print1", 1000, ( void * ) 0, 1, NULL );
		xTaskCreate( prvPrintTask, "Print2", 1000, ( void * ) 1, 2, NULL );

		/* Create the gatekeeper task.  This is the only task that is permitted
		to access standard out. */
		xTaskCreate( prvStdioGatekeeperTask, "Gatekeeper", 1000, NULL, 0, NULL );
		
		/* Start the scheduler so the created tasks start executing. */
		vTaskStartScheduler();
	}
		
    /* If all is well we will never reach here as the scheduler will now be
    running the tasks.  If we do reach here then it is likely that there was 
    insufficient heap memory available for a resource to be created. */
	for( ;; );
	return 0;
}
/*-----------------------------------------------------------*/

static void prvStdioGatekeeperTask( void *pvParameters )
{
char *pcMessageToPrint;

	/* This is the only task that is allowed to write to the terminal output.
	Any other task wanting to write to the output does not access the terminal
	directly, but instead sends the output to this task.  As only one task 
	writes to standard out there are no mutual exclusion or serialization issues
	to consider within this task itself. */
	for( ;; )
	{
		/* Wait for a message to arrive. */
		xQueueReceive( xPrintQueue, &pcMessageToPrint, portMAX_DELAY );

		/* There is no need to check the return	value as the task will block 
		indefinitely and only run again when a message has arrived.  When the
		next line is executed there will be a message to be output. */
		printf( "%s", pcMessageToPrint );
		fflush( stdout );

		/* Now simply go back to wait for the next message. */
	}
}
/*-----------------------------------------------------------*/

void vApplicationTickHook( void )
{
static int iCount = 0;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;

	/* Print out a message every 200 ticks.  The message is not written out
	directly, but sent to the gatekeeper task. */
	iCount++;
	if( iCount >= 200 )
	{
		/* In this case the last parameter (xHigherPriorityTaskWoken) is not
		actually used but must still be supplied. */
		xQueueSendToFrontFromISR( xPrintQueue, &( pcStringsToPrint[ 2 ] ), &xHigherPriorityTaskWoken );

		/* Reset the count ready to print out the string again in 200 ticks 
		time. */		
		iCount = 0;
	}
}
/*-----------------------------------------------------------*/

static void prvPrintTask( void *pvParameters )
{
int iIndexToString;

	/* Two instances of this task are created so the index to the string the task 
	will send to the gatekeeper task is passed in the task parameter.  Cast this 
	to the required type. */
	iIndexToString = ( int ) pvParameters;

	for( ;; )
	{
		/* Print out the string, not directly but by passing the string to the
		gatekeeper task on the queue.  The queue is created before the scheduler is
		started so will already exist by the time this task executes.  A block time
		is not specified as there should always be space in the queue. */
		xQueueSendToBack( xPrintQueue, &( pcStringsToPrint[ iIndexToString ] ), 0 );

		/* Wait a pseudo random time.  Note that rand() is not necessarily 
		re-entrant, but in this case it does not really matter as the code does
		not care what value is returned.  In a more secure application a version
		of rand() that is known to be re-entrant should be used - or calls to
		rand() should be protected using a critical section. */
		vTaskDelay( ( rand() & 0x1FF ) );
	}
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色哟哟一区二区三区| 久久久亚洲综合| 日韩一级片在线播放| 国产欧美日韩亚州综合 | 色综合久久久久久久久| 欧美福利视频导航| 亚洲人成网站在线| 国产盗摄女厕一区二区三区 | 不卡一区二区三区四区| 91麻豆精品国产91久久久久久| 国产亚洲精品免费| 麻豆成人在线观看| 精品视频色一区| 亚洲欧美欧美一区二区三区| 国产一区二区三区黄视频| 欧美日韩国产另类一区| 亚洲人成网站色在线观看| 国产一区二区三区美女| 日韩一区二区精品在线观看| 一区二区成人在线| 99re这里只有精品首页| 国产欧美一区二区精品仙草咪 | 亚洲精品一二三区| 97国产一区二区| 国产精品国模大尺度视频| 精品一区二区国语对白| 91精品国产综合久久香蕉麻豆| 亚洲美女视频在线观看| 91视频免费播放| 亚洲欧美日韩久久| 在线一区二区三区四区五区| 最新国产精品久久精品| 波多野洁衣一区| 中文字幕在线视频一区| 不卡视频免费播放| 中文字幕日韩欧美一区二区三区| 国产成人免费在线视频| 中文字幕精品综合| 91猫先生在线| 亚洲国产精品久久人人爱| 欧美视频一二三区| 日日嗨av一区二区三区四区| 欧美一二三区精品| 国产一区美女在线| 国产丝袜欧美中文另类| 国产成人在线网站| 国产精品久99| 欧美亚州韩日在线看免费版国语版 | 日韩一区二区三区观看| 经典三级在线一区| 国产精品系列在线| 在线观看免费亚洲| 欧美aaaaaa午夜精品| 精品日韩欧美在线| 成人午夜免费视频| 夜夜嗨av一区二区三区| 91精品国产品国语在线不卡| 风间由美一区二区av101| 亚洲国产精品二十页| 色综合激情久久| 日本va欧美va精品发布| 久久精品人人爽人人爽| 色88888久久久久久影院野外| 午夜精品久久久久久久蜜桃app | 在线观看欧美黄色| 毛片一区二区三区| 一区精品在线播放| 制服丝袜一区二区三区| 国产成人啪免费观看软件| 夜色激情一区二区| 26uuu精品一区二区在线观看| av一区二区三区四区| 图片区小说区区亚洲影院| 久久蜜桃av一区二区天堂| 91蜜桃在线免费视频| 久久国产精品免费| 亚洲三级视频在线观看| 日韩精品在线看片z| 91免费国产在线观看| 老司机精品视频一区二区三区| 亚洲国产成人午夜在线一区| 欧美日韩高清在线播放| 成a人片国产精品| 日本va欧美va精品发布| 亚洲婷婷国产精品电影人久久| 678五月天丁香亚洲综合网| 成人免费看片app下载| 日韩av电影天堂| 亚洲欧美在线视频观看| 精品国产乱码久久久久久夜甘婷婷| 色综合天天性综合| 国产成人av影院| 麻豆91在线播放| 亚洲曰韩产成在线| 亚洲欧洲精品一区二区精品久久久| 日韩一卡二卡三卡四卡| 欧洲激情一区二区| av资源站一区| 国产精品白丝av| 狠狠色丁香婷综合久久| 日韩国产精品91| 天堂一区二区在线免费观看| 亚洲自拍偷拍综合| 一区二区三区四区在线免费观看 | 91精品国产色综合久久ai换脸 | 成人免费视频网站在线观看| 久久www免费人成看片高清| 日韩激情在线观看| 亚洲电影第三页| 亚洲一二三区在线观看| 亚洲精品午夜久久久| 国产精品色哟哟网站| 日本一区二区高清| 中文字幕免费不卡| 国产精品高潮久久久久无| 久久品道一品道久久精品| 亚洲精品一线二线三线| 精品国产乱码久久久久久牛牛| 日韩一区二区三区三四区视频在线观看| 欧美视频自拍偷拍| 欧美色综合网站| 欧美日韩精品一区视频| 欧美三级欧美一级| 欧美精品日日鲁夜夜添| 制服丝袜av成人在线看| 欧美一级在线观看| 欧美男人的天堂一二区| 欧美日韩一区二区三区四区五区 | 777午夜精品视频在线播放| 欧美日韩国产色站一区二区三区| 欧美亚洲自拍偷拍| 日韩视频一区二区三区在线播放| 欧美电影免费观看高清完整版在线| 日韩一区二区三区电影在线观看 | 国产自产高清不卡| 国产91在线看| 在线视频国内一区二区| 欧美日韩国产系列| 久久亚洲一区二区三区明星换脸| 亚洲国产成人自拍| 成人激情开心网| 91在线观看视频| 国产精品亚洲一区二区三区在线| 国产精品 欧美精品| 色婷婷久久久亚洲一区二区三区| 精品视频123区在线观看| 日韩欧美一区二区在线视频| 国产欧美精品一区二区三区四区| 欧洲生活片亚洲生活在线观看| 国产精品久久久久9999吃药| 国产日本一区二区| 国产网站一区二区| 国产女主播一区| 欧美经典一区二区| 国产欧美日韩不卡| 欧美高清在线一区| 中文字幕在线视频一区| 日韩理论片在线| 亚洲综合色噜噜狠狠| 一区二区三区电影在线播| 一区二区三区日韩欧美| 亚洲无人区一区| 日本最新不卡在线| 国内成人精品2018免费看| 精品一区二区三区蜜桃| 国产精品一二三四五| 成人深夜在线观看| 91福利精品视频| 欧美一二三区在线| 久久久久久久电影| 国产精品欧美久久久久一区二区 | 亚洲精品国产精华液| 亚洲gay无套男同| 日韩精品国产精品| 韩国av一区二区三区四区| 国产夫妻精品视频| 色综合一个色综合亚洲| 欧美视频在线播放| 欧美一区二区人人喊爽| 久久综合九色综合欧美就去吻| 国产欧美一区二区精品婷婷| 亚洲男同1069视频| 日韩影视精彩在线| 国产精品一区二区三区四区| 本田岬高潮一区二区三区| 欧美影院午夜播放| 久久毛片高清国产| 亚洲精品乱码久久久久| 美腿丝袜亚洲综合| 99精品国产热久久91蜜凸| 欧美日韩精品电影| 国产亚洲精品aa| 亚洲国产成人91porn| 国产一区美女在线| 欧美四级电影在线观看| 国产欧美日韩久久| 蜜桃一区二区三区四区| 91丨九色porny丨蝌蚪| 欧美精品一区视频| 亚洲一区二区三区视频在线 |