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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? main.c

?? 最新版FreeRTOS, 包擴(kuò)多種開(kāi)發(fā)平臺(tái)的移植
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*
	FreeRTOS.org V4.1.1 - 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.
	***************************************************************************
*/

/* 
 * This demo application creates six co-routines and two tasks (three including 
 * the idle task).  The co-routines execute as part of the idle task hook.
 *
 * Five of the created co-routines are the standard 'co-routine flash' 
 * co-routines contained within the Demo/Common/Minimal/crflash.c file and 
 * documented on the FreeRTOS.org WEB site.  
 *
 * The 'LCD Task' rotates a string on the LCD, delaying between each character
 * as necessitated by the slow interface, and delaying between each string just
 * long enough to enable the text to be read.
 *
 * The sixth co-routine and final task control the transmission and reception
 * of a string to UART 0.  The co-routine periodically sends the first 
 * character of the string to the UART, with the UART's TxEnd interrupt being
 * used to transmit the remaining characters.  The UART's RxEnd interrupt 
 * receives the characters and places them on a queue to be processed by the 
 * 'COMs Rx' task.  An error is latched should an unexpected character be 
 * received, or any character be received out of sequence.  
 *
 * A loopback connector is required to ensure that each character transmitted 
 * on the UART is also received on the same UART.  For test purposes the UART
 * FIFO's are not utalised in order to maximise the interrupt overhead.  Also
 * a pseudo random interval is used between the start of each transmission in 
 * order that the resultant interrupts are more randomly distributed and 
 * therefore more likely to highlight any problems.
 *
 * The flash co-routines control LED's zero to four.  LED five is toggled each
 * time the string is transmitted on the UART.  LED six is toggled each time
 * the string is CORRECTLY received on the UART.  LED seven is latched on should
 * an error be detected in any task or co-routine.
 *
 * In addition the idle task makes repetative calls to 
 * prvSetAndCheckRegisters().  This simply loads the general purpose registers 
 * with a known value, then checks each register to ensure the held value is 
 * still correct.  As a low priority task this checking routine is likely to 
 * get repeatedly swapped in and out.  A register being found to contain an 
 * incorrect value is therefore indicative of an error in the task switching 
 * mechansim.
 *
 */

/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "croutine.h"

/* Demo application include files. */
#include "partest.h"
#include "crflash.h"

/* Library include files. */
#include "DriverLib.h"

/* The time to delay between writing each character to the LCD. */
#define mainCHAR_WRITE_DELAY		( 2 / portTICK_RATE_MS )

/* The time to delay between writing each string to the LCD. */
#define mainSTRING_WRITE_DELAY		( 400 / portTICK_RATE_MS )

/* The number of flash co-routines to create. */
#define mainNUM_FLASH_CO_ROUTINES	( 5 )

/* The length of the queue used to pass received characters to the Comms Rx
task. */
#define mainRX_QUEUE_LEN			( 5 )

/* The priority of the co-routine used to initiate the transmission of the 
string on UART 0. */
#define mainTX_CO_ROUTINE_PRIORITY	( 1 )

/* Only one co-routine is created so its index is not important. */
#define mainTX_CO_ROUTINE_INDEX		( 0 )

/* The time between transmissions of the string on UART 0.   This is pseudo
random in order to generate a bit or randomness to when the interrupts occur.*/
#define mainMIN_TX_DELAY			( 40 / portTICK_RATE_MS )
#define mainMAX_TX_DELAY			( ( portTickType ) 0x7f )
#define mainOFFSET_TIME				( ( portTickType ) 3 )

/* The time the Comms Rx task should wait to receive a character.  This should
be slightly longer than the time between transmissions.  If we do not receive
a character after this time then there must be an error in the transmission or
the timing of the transmission. */
#define mainCOMMS_RX_DELAY			( mainMAX_TX_DELAY + 20 )

/* The task priorites. */
#define mainLCD_TASK_PRIORITY		( tskIDLE_PRIORITY )
#define mainCOMMS_RX_TASK_PRIORITY	( tskIDLE_PRIORITY + 1 )

/* The LED's toggled by the various tasks. */
#define mainCOMMS_FAIL_LED			( 7 )
#define mainCOMMS_RX_LED			( 6 )
#define mainCOMMS_TX_LED			( 5 )

/* The baud rate used by the UART comms tasks/co-routine. */
#define mainBAUD_RATE				( 57600 )

/* FIFO setting for the UART.  The FIFO is not used to create a better test. */
#define mainFIFO_SET				( 0x10 )

/* The string that is transmitted on the UART contains sequentially the 
characters from mainFIRST_TX_CHAR to mainLAST_TX_CHAR. */
#define mainFIRST_TX_CHAR '0'
#define mainLAST_TX_CHAR 'z'

/* Just used to walk through the program memory in order that some random data
can be generated. */
#define mainTOTAL_PROGRAM_MEMORY ( ( unsigned portLONG * ) ( 8 * 1024 ) )
#define mainFIRST_PROGRAM_BYTES ( ( unsigned portLONG * ) 4 )

/* The error routine that is called if the driver library encounters an error. */
#ifdef DEBUG
void
__error__(char *pcFilename, unsigned long ulLine)
{
}
#endif

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

/*
 * The task that rotates text on the LCD.
 */
static void vLCDTask( void * pvParameters );

/*
 * The task that receives the characters from UART 0.
 */
static void vCommsRxTask( void * pvParameters );

/*
 * The co-routine that periodically initiates the transmission of the string on
 * the UART.
 */
static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );

/* 
 * Writes a string the the LCD.
 */
static void prvWriteString( const portCHAR *pcString );

/*
 * Initialisation routine for the UART.
 */
static void vSerialInit( void );

/*
 * Thread safe write to the PDC.
 */
static void prvPDCWrite( portCHAR cAddress, portCHAR cData );

/*
 * Function to simply set a known value into the general purpose registers
 * then read them back to ensure they remain set correctly.  An incorrect value
 * being indicative of an error in the task switching mechanism.
 */
void prvSetAndCheckRegisters( void );

/*
 * Latch the LED that indicates that an error has occurred. 
 */
void vSetErrorLED( void );

/*
 * Sets up the PLL and ports used by the demo.
 */
static void prvSetupHardware( void );

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

/* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines
defined within this file. */
unsigned portBASE_TYPE uxErrorStatus = pdPASS;

/* The next character to transmit. */
static portCHAR cNextChar;

/* The queue used to transmit characters from the interrupt to the Comms Rx
task. */
static xQueueHandle xCommsQueue;

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

int main( void )
{
	/* Create the queue used to communicate between the UART ISR and the Comms
	Rx task. */
	xCommsQueue = xQueueCreate( mainRX_QUEUE_LEN, sizeof( portCHAR ) );

	/* Setup the ports used by the demo and the clock. */
	prvSetupHardware();

	/* Create the co-routines that flash the LED's. */
	vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );

	/* Create the co-routine that initiates the transmission of characters
	on the UART. */
	xCoRoutineCreate( vSerialTxCoRoutine, mainTX_CO_ROUTINE_PRIORITY, mainTX_CO_ROUTINE_INDEX );

	/* Create the LCD and Comms Rx tasks. */
	xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );
	xTaskCreate( vCommsRxTask, "CMS", configMINIMAL_STACK_SIZE, NULL, mainCOMMS_RX_TASK_PRIORITY, NULL );

	/* Start the scheduler running the tasks and co-routines just created. */
	vTaskStartScheduler();

	/* Should not get here unless we did not have enough memory to start the
	scheduler. */
	for( ;; );
	return 0;
}
/*-----------------------------------------------------------*/

static void prvSetupHardware( void )
{
	/* Setup the PLL. */
	SysCtlClockSet( SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_6MHZ );

	/* Initialise the hardware used to talk to the LCD, LED's and UART. */
	PDCInit();
	vParTestInitialise();
	vSerialInit();
}
/*-----------------------------------------------------------*/

void vApplicationIdleHook( void )
{
	/* The co-routines are executed in the idle task using the idle task 
	hook. */
	for( ;; )
	{
		/* Schedule the co-routines. */
		vCoRoutineSchedule();

		/* Run the register check function between each co-routine. */
		prvSetAndCheckRegisters();
	}
}
/*-----------------------------------------------------------*/

static void prvWriteString( const portCHAR *pcString )
{
	/* Write pcString to the LED, pausing between each character. */
	prvPDCWrite(PDC_LCD_CSR, LCD_CLEAR);        
	while( *pcString )
	{
		vTaskDelay( mainCHAR_WRITE_DELAY );
		prvPDCWrite( PDC_LCD_RAM, *pcString );
		pcString++;
	}
}
/*-----------------------------------------------------------*/

void vLCDTask( void * pvParameters )
{
unsigned portBASE_TYPE uxIndex;
const unsigned portCHAR ucCFGData[] = {	
											0x30,   /* Set data bus to 8-bits. */
											0x30,
											0x30,
											0x3C,   /* Number of lines/font. */
											0x08,   /* Display off. */
											0x01,   /* Display clear. */
											0x06,   /* Entry mode [cursor dir][shift]. */
											0x0C	/* Display on [display on][curson on][blinking on]. */
									  };  

/* The strings that are written to the LCD. */
const portCHAR *pcStringsToDisplay[] = {										
											"Stellaris",
											"Demo",
											"One",
											"www.FreeRTOS.org",
											""
									   };

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色中色一区二区| 精品久久久久久综合日本欧美| 亚洲国产精品综合小说图片区| 欧美本精品男人aⅴ天堂| av一区二区三区在线| 美女视频免费一区| 夜夜亚洲天天久久| 亚洲国产精品成人综合| 日韩一二三四区| 在线观看日产精品| 国产精品一品视频| 免费国产亚洲视频| 亚洲一卡二卡三卡四卡| 国产精品美女www爽爽爽| 日韩午夜av一区| 欧美中文字幕一区二区三区亚洲| 高清国产一区二区| 韩国女主播一区| 色婷婷av一区二区三区gif| 韩国成人在线视频| 国产精品久久久久久久裸模| 在线免费亚洲电影| 本田岬高潮一区二区三区| 91蜜桃网址入口| 久久99精品久久久| 午夜精品一区在线观看| 2020国产精品久久精品美国| 欧美国产日本韩| 亚洲精选视频免费看| 丝瓜av网站精品一区二区| 久久精品99久久久| 成人动漫视频在线| 欧美羞羞免费网站| 精品免费国产二区三区 | 欧美片在线播放| 欧美一区二区三区播放老司机| 精品国产伦一区二区三区观看方式 | 久久久国产精品麻豆| 欧美激情中文字幕一区二区| 一区二区三区日韩| 激情深爱一区二区| 色婷婷综合久久久中文字幕| 91精品黄色片免费大全| 日本一区二区高清| 亚洲午夜羞羞片| 国产精品自拍av| 欧美性生活大片视频| 久久综合九色综合97婷婷| 中文字幕中文字幕中文字幕亚洲无线| 亚洲一区二区三区美女| 精品一区二区三区在线观看国产| 北条麻妃国产九九精品视频| 欧美剧在线免费观看网站 | 亚洲电影一区二区| 国产乱妇无码大片在线观看| 日本道色综合久久| 精品国产亚洲一区二区三区在线观看| ...xxx性欧美| 蜜臀av一区二区| 91片黄在线观看| 精品动漫一区二区三区在线观看| 亚洲欧美福利一区二区| 国产一区高清在线| 51精品国自产在线| 亚洲视频在线一区观看| 国产一区久久久| 欧美日韩美少妇| 中文字幕在线不卡一区| 久草这里只有精品视频| 在线观看中文字幕不卡| 亚洲国产精品二十页| 免费观看日韩电影| 欧美在线免费观看视频| 国产精品免费观看视频| 国产一区在线看| 这里只有精品99re| 亚洲国产va精品久久久不卡综合| 成人av影视在线观看| 日韩欧美亚洲一区二区| 亚洲二区视频在线| 日本久久一区二区| 亚洲天堂2016| 成人黄色片在线观看| 精品国产乱子伦一区| 日本午夜精品视频在线观看| 欧美视频一区在线| 亚洲黄色片在线观看| 99精品视频一区二区三区| 日本一区二区三区在线不卡| 久久国内精品自在自线400部| 欧美日韩一区高清| 亚洲综合色婷婷| 91精品1区2区| 亚洲伦理在线免费看| 91影视在线播放| √…a在线天堂一区| 99这里只有精品| 国产精品三级视频| 成人h精品动漫一区二区三区| 久久久国产一区二区三区四区小说 | 天天射综合影视| 欧美午夜精品久久久久久超碰 | 国产欧美精品一区| 国产成a人亚洲精品| 久久久久久黄色| 国产成人综合自拍| 国产日产亚洲精品系列| 丁香六月久久综合狠狠色| 久久久91精品国产一区二区精品| 狠狠色2019综合网| 国产视频一区二区在线观看| 国产一区二区三区美女| 国产日韩av一区二区| 成人性生交大片免费看在线播放| 国产精品欧美久久久久一区二区| 成人精品一区二区三区四区| 国产精品白丝在线| 色婷婷av一区二区三区大白胸| 一区二区三区在线看| 欧美日韩精品专区| 蜜臀av在线播放一区二区三区| 欧美大尺度电影在线| 国产一区二区三区四| 国产精品麻豆一区二区| 99精品久久99久久久久| 亚洲欧美日韩国产中文在线| 欧美这里有精品| 图片区小说区国产精品视频| 欧美va天堂va视频va在线| 国产盗摄视频一区二区三区| 1024成人网| 欧美日韩亚洲高清一区二区| 久久精品国产秦先生| 国产欧美视频一区二区| 91在线精品一区二区| 亚洲18女电影在线观看| 精品日韩在线观看| www.日韩av| 婷婷丁香久久五月婷婷| 久久精品人人做人人爽97| 97精品久久久午夜一区二区三区| 亚洲五码中文字幕| 久久女同性恋中文字幕| 91免费在线播放| 免费观看一级欧美片| 日本一区二区综合亚洲| 欧美日韩视频不卡| 国产一区二区三区视频在线播放 | 成人精品高清在线| 亚洲bt欧美bt精品| 欧美国产一区视频在线观看| 欧美中文字幕不卡| 国产精品资源站在线| 亚洲一区二区三区不卡国产欧美| 精品va天堂亚洲国产| 色美美综合视频| 久久av资源站| 伊人一区二区三区| 久久久久一区二区三区四区| 色偷偷成人一区二区三区91| 激情文学综合丁香| 洋洋av久久久久久久一区| 久久久久久久电影| 91精品久久久久久久91蜜桃| a在线播放不卡| 麻豆精品在线视频| 亚洲精品国产无天堂网2021| 久久精品人人做人人爽97| 欧美日韩一级黄| 成人免费视频一区| 久久精品国产一区二区| 一二三四区精品视频| 国产欧美综合在线| 日韩一区二区电影| 日本乱码高清不卡字幕| 国产91丝袜在线观看| 美女视频第一区二区三区免费观看网站| 国产精品乱码一区二区三区软件 | av资源网一区| 韩国一区二区三区| 日韩精品一级中文字幕精品视频免费观看| 中国色在线观看另类| 日韩精品一区二区三区视频| 欧美午夜精品久久久久久超碰| 成人精品一区二区三区四区 | 欧美日韩美女一区二区| 91视频在线观看免费| 国产a级毛片一区| 韩国精品免费视频| 蜜臀国产一区二区三区在线播放 | 亚洲第一狼人社区| 亚洲激情成人在线| 亚洲人亚洲人成电影网站色| 欧美极品少妇xxxxⅹ高跟鞋| 欧美大尺度电影在线| 欧美一二三区在线| 欧美一级专区免费大片| 欧美久久久一区| 欧美亚洲动漫另类| 欧美做爰猛烈大尺度电影无法无天|