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

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

?? main.c

?? 最新版FreeRTOS, 包擴多種開發平臺的移植
?? C
?? 第 1 頁 / 共 2 頁
字號:
											"Demo",
											"One",
											"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 vCommsRxTask( void * pvParameters )
{
static portCHAR cRxedChar, cExpectedChar;

	/* Set the char we expect to receive to the start of the string. */
	cExpectedChar = mainFIRST_TX_CHAR;

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

		/* Was the character recived (if any) the expected character. */
		if( cRxedChar != cExpectedChar )
		{
			/* 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 )
			{
				while( !xQueueReceive( xCommsQueue, ( void * ) &cRxedChar, portMAX_DELAY ) );
			}

			/* 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++;
			}
		}
	}
}
/*-----------------------------------------------------------*/

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 = xQueueSendFromISR( 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 )
	{
		/* If a task was woken by the character being received then we force
		a context switch to occur in case the task is of higher priority than
		the currently executing task (i.e. the task that this interrupt 
		interrupted.) */
		portEND_SWITCHING_ISR( xTaskWokenByPost );
	}
}
/*-----------------------------------------------------------*/

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

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

void prvSetAndCheckRegisters( void )
{
	/* Fill the general purpose registers with known values. */
	__asm volatile( "    mov r11, #10\n"
                  "    add r0, r11, #1\n"
                  "    add r1, r11, #2\n"
	                "    add r2, r11, #3\n"
	                "    add r3, r11, #4\n"
	                "    add r4, r11, #5\n"
	                "    add r5, r11, #6\n"
	                "    add r6, r11, #7\n"
	                "    add r7, r11, #8\n"
	                "    add r8, r11, #9\n"
	                "    add r9, r11, #10\n"
	                "    add r10, r11, #11\n"
	                "    add r12, r11, #12" );

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

  __asm volatile( "set_error_led:\n"
	                "    push {r14}\n"
	                "    ldr r1, =vSetErrorLED\n"
	                "    blx r1\n"
	                "    pop {r14}\n"
	                "    bx lr" );
}
/*-----------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成影院在线观看| 国产精品69久久久久水密桃| 国内精品伊人久久久久影院对白| 成人午夜av在线| 日韩欧美一级二级| 一区二区三区欧美久久| 精品亚洲欧美一区| 欧美视频一区在线| 国产精品麻豆99久久久久久| 蜜桃精品视频在线观看| 色婷婷av一区| 中文字幕一区三区| 国产精品77777| 久久亚洲捆绑美女| 麻豆精品一区二区三区| 欧美美女bb生活片| 亚洲电影视频在线| 在线观看www91| 一区二区三区欧美在线观看| 国产ts人妖一区二区| 日韩精品专区在线影院重磅| 亚洲小少妇裸体bbw| 91丨porny丨最新| 亚洲欧美综合在线精品| 粉嫩久久99精品久久久久久夜| 精品国产一区二区三区忘忧草| 日日摸夜夜添夜夜添精品视频 | 国产高清精品久久久久| 欧美老人xxxx18| 三级在线观看一区二区 | 一色屋精品亚洲香蕉网站| 国产精品中文欧美| 久久蜜桃av一区精品变态类天堂| 免费高清在线视频一区·| 69堂成人精品免费视频| 偷拍亚洲欧洲综合| 欧美一区二区三区小说| 麻豆精品一区二区| 欧美一区二区三区视频| 捆绑调教一区二区三区| 2014亚洲片线观看视频免费| 久久99精品久久久久婷婷| 欧美sm美女调教| 国产98色在线|日韩| 国产精品视频yy9299一区| 国产成人自拍在线| 日韩久久一区二区| 在线免费亚洲电影| 无码av中文一区二区三区桃花岛| 欧美电影影音先锋| 国产一区二区中文字幕| 国产欧美精品一区二区色综合朱莉| 国产精品一区在线观看乱码 | 国产精品自拍在线| 国产精品久久久久久福利一牛影视 | 玉米视频成人免费看| 99国产精品国产精品久久| 亚洲国产成人精品视频| 日韩欧美国产午夜精品| 成人久久视频在线观看| 亚洲成人动漫一区| 国产午夜精品久久久久久免费视| 波多野结衣精品在线| 亚洲成a人片在线观看中文| 日韩精品一区二区三区视频在线观看| 国产大陆亚洲精品国产| 一区二区三区美女| 久久综合五月天婷婷伊人| 91麻豆国产精品久久| 免费视频最近日韩| 亚洲欧洲性图库| 日韩欧美一级特黄在线播放| 91小视频在线免费看| 午夜成人在线视频| 国产精品久久久久久久裸模| 在线不卡中文字幕| 92精品国产成人观看免费 | 亚洲亚洲人成综合网络| 久久网站最新地址| 欧美日韩另类国产亚洲欧美一级| 精品一区二区三区免费视频| 亚洲另类在线制服丝袜| 国产午夜精品理论片a级大结局| 欧美日韩五月天| k8久久久一区二区三区| 麻豆91在线播放免费| 亚洲影视在线观看| 欧美韩日一区二区三区四区| 91精品一区二区三区久久久久久| 成人性生交大片| 日本中文字幕一区二区有限公司| 亚洲欧洲国产日本综合| 精品久久五月天| 日韩一级片网址| 欧美精品久久天天躁| 在线一区二区三区四区五区 | 久久99热这里只有精品| 一区二区三区精品视频| 中文字幕中文字幕在线一区 | 精品国产一区二区精华| 欧美在线视频你懂得| 99视频有精品| 成人综合在线观看| 久久99国产乱子伦精品免费| 婷婷久久综合九色国产成人| 亚洲国产你懂的| 一区二区三区波多野结衣在线观看 | 色综合激情五月| 丁香婷婷综合色啪| 国产乱淫av一区二区三区| www.成人网.com| a级高清视频欧美日韩| 国产成人精品三级麻豆| 国产一区二区三区免费看| 国产在线国偷精品产拍免费yy| 久久黄色级2电影| 精东粉嫩av免费一区二区三区 | 亚洲成人激情综合网| 亚洲日本在线观看| 亚洲精品高清在线观看| 一区二区三区在线观看国产| 亚洲欧美日韩久久| 午夜欧美2019年伦理| 青青草原综合久久大伊人精品 | 国产在线国偷精品免费看| 奇米色一区二区| 精久久久久久久久久久| 国产91丝袜在线播放0| 成人午夜视频在线| 91在线视频免费91| 欧美日韩在线三级| 日韩欧美综合在线| 久久精品在这里| 亚洲精品美国一| 蜜桃视频在线一区| 国产精品66部| 日本高清不卡一区| 日韩一区二区在线看| 久久尤物电影视频在线观看| 国产精品国模大尺度视频| 亚洲最色的网站| 老司机免费视频一区二区| 大陆成人av片| 在线成人高清不卡| 欧美激情综合在线| 亚洲mv大片欧洲mv大片精品| 国产在线一区观看| 91国偷自产一区二区三区观看 | 欧美高清视频一二三区| 久久久久国产精品免费免费搜索| 中文字幕制服丝袜一区二区三区| 亚洲国产另类精品专区| 久久福利视频一区二区| 97se亚洲国产综合自在线| 日韩三级视频在线观看| 中文字幕一区不卡| 麻豆成人在线观看| 色综合色狠狠天天综合色| 日韩三级免费观看| 亚洲男女一区二区三区| 精品影视av免费| 欧美性猛交xxxx黑人交| 久久久久国产精品麻豆| 午夜久久久影院| 91在线精品秘密一区二区| 日韩亚洲欧美一区| 夜夜精品视频一区二区| 成人妖精视频yjsp地址| 日韩精品中文字幕一区二区三区| 亚洲精品乱码久久久久久黑人 | 91色porny蝌蚪| 欧美精品一区视频| 亚洲国产毛片aaaaa无费看| 国产成人精品www牛牛影视| 欧美精品一二三| 一区二区久久久久久| 不卡电影一区二区三区| 26uuu国产在线精品一区二区| 天堂精品中文字幕在线| 91麻豆精品在线观看| 国产欧美1区2区3区| 国内精品嫩模私拍在线| 欧美一区二区三区视频在线 | 亚洲精品久久嫩草网站秘色| 国产一区二区网址| 91精品国产高清一区二区三区 | 91精品国产入口在线| 亚洲品质自拍视频网站| 成人免费观看男女羞羞视频| 国产亚洲欧美一区在线观看| 久久66热偷产精品| 亚洲精品在线观看视频| 蜜臀av国产精品久久久久 | 欧美日韩视频在线观看一区二区三区 | 国产精品久久久久9999吃药| 国产在线乱码一区二区三区| 欧美电影免费观看高清完整版在线观看 | 国产一区二区看久久| 久久久久久久久久久黄色| 久99久精品视频免费观看|