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

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

?? main.c

?? 最新版FreeRTOS, 包擴多種開發平臺的移植
?? C
?? 第 1 頁 / 共 2 頁
字號:
											"Two",
											"www.FreeRTOS.org",
											""
									   };

	/* Configure the LCD. */
	uxIndex = 0;
	while( uxIndex < sizeof( ucCFGData ) )
	{
		prvPDCWrite( PDC_LCD_CSR, ucCFGData[ uxIndex ] );
		uxIndex++;
		vTaskDelay( mainCHAR_WRITE_DELAY );
	}

	/* Turn the LCD Backlight on. */
	prvPDCWrite( PDC_CSR, 0x01 );

	/* Clear display. */
	vTaskDelay( mainCHAR_WRITE_DELAY );
	prvPDCWrite( PDC_LCD_CSR, LCD_CLEAR ); 

	uxIndex = 0;
	for( ;; )    
	{
		/* Display the string on the LCD. */
		prvWriteString( pcStringsToDisplay[ uxIndex ] );
		
		/* Move on to the next string - wrapping if necessary. */
		uxIndex++;
		if( *( pcStringsToDisplay[ uxIndex ] ) == 0x00 )
		{
			uxIndex = 0;
			/* Longer pause on the last string to be sent. */
			vTaskDelay( mainSTRING_WRITE_DELAY * 2 );
		}

		/* Wait until it is time to move onto the next string. */
		vTaskDelay( mainSTRING_WRITE_DELAY );
	}
}
/*-----------------------------------------------------------*/

static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{
static portCHAR cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;
portBASE_TYPE xResult;

	crSTART( xHandle );

	for( ;; )
	{
		/* Wait for a character to be received. */
		crQUEUE_RECEIVE( xHandle, xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY, &xResult );

		/* Was the character recived (if any) the expected character. */
		if( ( cRxedChar != cExpectedChar ) || ( xResult != pdPASS ) )
		{
			/* Got an unexpected character.  This can sometimes occur when
			reseting the system using the debugger leaving characters already
			in the UART regsters. */
			uxErrorStatus = pdFAIL;

			/* Resync by waiting for the end of the current string. */
			while( cRxedChar != mainLAST_TX_CHAR )
			{
				crQUEUE_RECEIVE( xHandle, xCommsQueue, ( void * ) &cRxedChar, mainCOMMS_RX_DELAY, &xResult );
			}

			/* The next expected character is the start of the string again. */
			cExpectedChar = mainFIRST_TX_CHAR;
		}
		else
		{
			if( cExpectedChar == mainLAST_TX_CHAR )
			{
				/* We have reached the end of the string - we now expect to 
				receive the first character in the string again.   The LED is 
				toggled to indicate that the entire string was received without
				error. */
				vParTestToggleLED( mainCOMMS_RX_LED );
				cExpectedChar = mainFIRST_TX_CHAR;
			}
			else
			{
				/* We got the expected character, we now expect to receive the
				next character in the string. */
				cExpectedChar++;
			}
		}
	}

	crEND();
}
/*-----------------------------------------------------------*/

static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{
portTickType xDelayPeriod;
static unsigned portLONG *pulRandomBytes = mainFIRST_PROGRAM_BYTES;

	/* Co-routine MUST start with a call to crSTART. */
	crSTART( xHandle );

	for(;;)
    {	
		/* Was the previously transmitted string received correctly? */
		if( uxErrorStatus != pdPASS )
		{
			/* An error was encountered so set the error LED. */
			vSetErrorLED();
		}

		/* The next character to Tx is the first in the string. */
		cNextChar = mainFIRST_TX_CHAR;

		UARTIntDisable( UART0_BASE, UART_INT_TX );
		{
			/* Send the first character. */
			if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
			{
				HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
			}

			/* Move the variable to the char to Tx on so the ISR transmits
			the next character in the string once this one has completed. */
			cNextChar++;
		}
		UARTIntEnable(UART0_BASE, UART_INT_TX);

		/* Toggle the LED to show a new string is being transmitted. */
        vParTestToggleLED( mainCOMMS_TX_LED );

		/* Delay before we start the string off again.  A pseudo-random delay
		is used as this will provide a better test. */
		xDelayPeriod = xTaskGetTickCount() + ( *pulRandomBytes );

		pulRandomBytes++;
		if( pulRandomBytes > mainTOTAL_PROGRAM_MEMORY )
		{
			pulRandomBytes = mainFIRST_PROGRAM_BYTES;
		}

		/* Make sure we don't wait too long... */
		xDelayPeriod &= mainMAX_TX_DELAY;

		/* ...but we do want to wait. */
		if( xDelayPeriod < mainMIN_TX_DELAY )
		{
			xDelayPeriod = mainMIN_TX_DELAY;
		}

		/* Block for the random(ish) time. */
		crDELAY( xHandle, xDelayPeriod );
    }

	/* Co-routine MUST end with a call to crEND. */
	crEND();
}
/*-----------------------------------------------------------*/

static void vSerialInit( void )
{
	/* Enable the UART.  GPIOA has already been initialised. */
	SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

	/* Set GPIO A0 and A1 as peripheral function.  They are used to output the
	UART signals. */
	GPIODirModeSet( GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1, GPIO_DIR_MODE_HW );

	/* Configure the UART for 8-N-1 operation. */
	UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE );

	/* We dont want to use the fifo.  This is for test purposes to generate
	as many interrupts as possible. */
	HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET;

	/* Enable both Rx and Tx interrupts. */
	HWREG( UART0_BASE + UART_O_IM ) |= ( UART_INT_TX | UART_INT_RX );
	IntEnable( INT_UART0 );
}
/*-----------------------------------------------------------*/

void vUART_ISR(void)
{
unsigned portLONG ulStatus;
portCHAR cRxedChar;
portBASE_TYPE xTaskWokenByPost = pdFALSE;

	/* What caused the interrupt. */
	ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );

	/* Clear the interrupt. */
	UARTIntClear( UART0_BASE, ulStatus );

	/* Was an Rx interrpt pending? */
	if( ulStatus & UART_INT_RX )
	{
		if( ( HWREG(UART0_BASE + UART_O_FR ) & UART_FR_RXFF ) )
		{
			/* Get the char from the buffer and post it onto the queue of
			Rxed chars.  Posting the character should wake the task that is 
			blocked on the queue waiting for characters. */
			cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
			xTaskWokenByPost = crQUEUE_SEND_FROM_ISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
		}		
	}

	/* Was a Tx interrupt pending? */
	if( ulStatus & UART_INT_TX )
	{
		/* Send the next character in the string.  We are not using the FIFO. */
		if( cNextChar <= mainLAST_TX_CHAR )
		{
			if( !( HWREG( UART0_BASE + UART_O_FR ) & UART_FR_TXFF ) )
			{
				HWREG( UART0_BASE + UART_O_DR ) = cNextChar;
			}
			cNextChar++;
		}
	}
	
	if( xTaskWokenByPost )
	{
		/* We are posting to a co-routine rather than a task so don't bother
		causing a task switch. */
	}
}
/*-----------------------------------------------------------*/

static void prvPDCWrite( portCHAR cAddress, portCHAR cData )
{
	vTaskSuspendAll();
	{
		PDCWrite( cAddress, cData );
	}
	xTaskResumeAll();
}
/*-----------------------------------------------------------*/

void vSetErrorLED( void )
{
	vParTestSetLED( mainCOMMS_FAIL_LED, pdTRUE );
}
/*-----------------------------------------------------------*/

__asm void prvSetAndCheckRegisters( void )
{
	extern vSetErrorLED

	/* Fill the general purpose registers with known values. */
	mov r11, #10
	add r0, r11, #1
	add r1, r11, #2
	add r2, r11, #3
	add r3, r11, #4
	add r4, r11, #5
	add r5, r11, #6
	add r6, r11, #7
	add r7, r11, #8
	add r8, r11, #9
	add r9, r11, #10
	add r10, r11, #11
	add r12, r11, #12

	/* Check the values are as expected. */
	cmp r11, #10
	bne set_error_led
	cmp r0, #11
	bne set_error_led
	cmp r1, #12
	bne set_error_led
	cmp r2, #13
	bne set_error_led
	cmp r3, #14
	bne set_error_led
	cmp r4, #15
	bne set_error_led
	cmp r5, #16
	bne set_error_led
	cmp r6, #17
	bne set_error_led
	cmp r7, #18
	bne set_error_led
	cmp r8, #19
	bne set_error_led
	cmp r9, #20
	bne set_error_led
	cmp r10, #21
	bne set_error_led
	cmp r12, #22
	bne set_error_led
	bx lr

set_error_led;
	push {r14}
	ldr r1, =vSetErrorLED
	blx r1
	pop {r14}
	bx lr;
}
/*-----------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.日韩av| 免费观看30秒视频久久| 91麻豆123| 亚洲女爱视频在线| 色婷婷综合五月| 午夜视黄欧洲亚洲| 91精品国产美女浴室洗澡无遮挡| 天天av天天翘天天综合网| 91麻豆精品国产自产在线| 日本aⅴ亚洲精品中文乱码| 欧美成人aa大片| 国产精品主播直播| 国产精品区一区二区三区| av激情成人网| 婷婷成人综合网| 久久婷婷久久一区二区三区| 99综合电影在线视频| 午夜精品成人在线| 久久久久99精品一区| 97精品电影院| 日韩成人免费电影| 久久亚区不卡日本| 9191久久久久久久久久久| 国产一区二三区| 亚洲人成网站影音先锋播放| 欧美日韩精品免费观看视频| 国产尤物一区二区在线| 亚洲欧美一区二区不卡| 91麻豆精品国产91久久久久久| 国产成人免费视频一区| 午夜视频一区二区| 中文字幕av不卡| 日韩一二三区视频| 成人动漫一区二区| 免费的国产精品| 亚洲日本乱码在线观看| 91精品免费在线观看| av亚洲产国偷v产偷v自拍| 日本aⅴ亚洲精品中文乱码| 中文字幕在线观看一区| 欧美一二三四在线| 日本韩国一区二区三区视频| 国产一区二区美女诱惑| 亚洲国产美女搞黄色| 国产精品沙发午睡系列990531| 欧美人体做爰大胆视频| 一本一本久久a久久精品综合麻豆| 免费成人美女在线观看.| 亚洲激情男女视频| 国产精品视频免费看| 日韩精品最新网址| 欧美人与z0zoxxxx视频| 在线观看国产一区二区| 懂色av一区二区夜夜嗨| 激情综合五月天| 日韩不卡一区二区三区| 伊人开心综合网| 国产精品免费aⅴ片在线观看| 日韩欧美国产电影| 欧美一区二区三区四区高清| 色吧成人激情小说| 99精品久久99久久久久| 波多野结衣中文字幕一区二区三区| 麻豆国产一区二区| 日本亚洲三级在线| 午夜精品免费在线| 亚洲综合一二区| 一区二区三区日韩精品| 亚洲精品日日夜夜| 一区在线观看免费| 成人欧美一区二区三区| 国产精品国产三级国产三级人妇 | 不卡一区二区三区四区| 国产乱一区二区| 久久97超碰国产精品超碰| 奇米色一区二区| 日韩主播视频在线| 香港成人在线视频| 一片黄亚洲嫩模| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲视频狠狠干| 亚洲欧美日韩国产中文在线| 亚洲美女视频在线观看| 亚洲精品成人少妇| 亚洲精品亚洲人成人网| 亚洲电影一级黄| 日韩电影在线免费看| 久久精品国产99国产精品| 激情另类小说区图片区视频区| 国产一区二区视频在线播放| 国产精品99久久久| 99精品在线观看视频| 色婷婷综合久色| 欧美日韩精品免费| 日韩一区二区免费视频| 久久只精品国产| 成人欧美一区二区三区白人| 亚洲高清免费视频| 久久99精品久久只有精品| 成人毛片视频在线观看| 色综合久久综合网97色综合 | 精品久久久久久久久久久久久久久久久| 日韩欧美国产三级电影视频| 久久精品人人做人人爽人人| 中文字幕一区日韩精品欧美| 亚洲成av人片一区二区| 极品少妇xxxx精品少妇| 99久久精品国产观看| 欧美在线观看一区| 26uuu国产电影一区二区| 最新国产成人在线观看| 三级久久三级久久| 成人免费毛片a| 91精品视频网| 国产精品看片你懂得| 日韩精品亚洲一区二区三区免费| 国产精品自拍毛片| 欧美久久久影院| 国产精品网站一区| 日韩电影在线一区| 91麻豆成人久久精品二区三区| 欧美大片一区二区| 亚洲乱码精品一二三四区日韩在线| 六月丁香婷婷久久| 欧美在线free| 日本一区二区电影| 免费美女久久99| 欧洲精品视频在线观看| 久久久久国产一区二区三区四区 | 国产精品久久777777| 视频一区免费在线观看| 99久久精品一区| 欧美精品一区二区高清在线观看| 亚洲精品欧美在线| 国产成人亚洲综合a∨婷婷图片| 欧美日韩的一区二区| 18欧美乱大交hd1984| 国产精品69久久久久水密桃| 这里只有精品视频在线观看| 亚洲青青青在线视频| 国产成人啪午夜精品网站男同| 欧美一区二区精品久久911| 有码一区二区三区| av中文字幕亚洲| 国产视频一区在线观看| 久久99精品国产麻豆婷婷洗澡| 欧美性猛交xxxxxxxx| 一区二区在线观看视频| 在线综合亚洲欧美在线视频| 综合色天天鬼久久鬼色| 粉嫩欧美一区二区三区高清影视| 欧美v日韩v国产v| 欧美bbbbb| 制服.丝袜.亚洲.另类.中文| 午夜一区二区三区在线观看| 色呦呦日韩精品| 国产精品成人午夜| 成人av网站在线| 国产精品家庭影院| 99re8在线精品视频免费播放| 久久精品视频在线免费观看| 国产麻豆精品theporn| 26uuu国产在线精品一区二区| 精品无码三级在线观看视频| 欧美va亚洲va在线观看蝴蝶网| 免费观看在线综合| 欧美mv和日韩mv的网站| 美女mm1313爽爽久久久蜜臀| 欧美刺激脚交jootjob| 久久精品理论片| 久久精品人人做人人综合| 国产精品 欧美精品| 国产欧美日韩视频在线观看| 国产精品一线二线三线| 国产欧美一区二区精品婷婷| 国产91精品露脸国语对白| 国产精品视频看| 在线精品国精品国产尤物884a| 亚洲第一久久影院| 678五月天丁香亚洲综合网| 久久国产免费看| 久久久99精品免费观看| 成人免费看的视频| 亚洲一区二区三区精品在线| 欧美人xxxx| 国产一区美女在线| 国产精品国产自产拍在线| 欧美午夜精品久久久久久孕妇 | 日韩和欧美的一区| 日韩精品一区二区三区中文不卡 | 亚洲主播在线播放| 欧美精品久久久久久久久老牛影院| 美女www一区二区| 国产精品久久午夜夜伦鲁鲁| 在线观看欧美精品| 精品亚洲成av人在线观看| 国产精品久久久久久久第一福利| 91精品1区2区| 国内久久精品视频| 亚洲女同ⅹxx女同tv|