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

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

?? main.c

?? 最新版FreeRTOS, 包擴多種開發平臺的移植
?? C
?? 第 1 頁 / 共 2 頁
字號:
											"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 );
}
/*-----------------------------------------------------------*/

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, vSetErrorLEDConst\n"
	"	blx r1				\n"
	"	pop {r14}			\n"
	"	bx lr				\n"
	"						\n"
	"	.align 2			\n"
	"vSetErrorLEDConst: .word vSetErrorLED"
	);
}
/*-----------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精东粉嫩av免费一区二区三区| 1024成人网色www| 97精品国产露脸对白| 成人精品鲁一区一区二区| 国产精品1区2区| 国产精品亚洲成人| 风间由美中文字幕在线看视频国产欧美| 激情综合亚洲精品| 韩国女主播成人在线观看| 精品无码三级在线观看视频| 国模少妇一区二区三区| 国产美女一区二区三区| 处破女av一区二区| 91欧美一区二区| 欧美亚洲精品一区| 777精品伊人久久久久大香线蕉| 欧美精品一卡二卡| 精品国产伦一区二区三区观看方式| 精品久久久久久亚洲综合网| 国产日韩精品视频一区| 亚洲男人电影天堂| 日韩1区2区3区| 国产麻豆精品久久一二三| 波多野结衣91| 欧美日韩一区二区在线观看| 日韩欧美激情四射| 国产欧美日本一区视频| 一区二区在线观看不卡| 久88久久88久久久| 高清成人免费视频| 欧美视频精品在线| 精品福利一区二区三区| 亚洲精品中文在线| 精久久久久久久久久久| 色悠悠久久综合| 精品久久人人做人人爽| 亚洲欧美另类图片小说| 加勒比av一区二区| 精品视频1区2区| 欧美韩日一区二区三区四区| 日韩一区欧美二区| 成人av午夜影院| 欧美一区二视频| 亚洲一区二区不卡免费| 国产xxx精品视频大全| 4438x成人网最大色成网站| 中文av一区二区| 国内精品免费在线观看| 欧美午夜一区二区| 国产精品色在线| 国产九色sp调教91| 日韩亚洲欧美在线观看| 亚洲精品成a人| 成人做爰69片免费看网站| 日韩欧美综合在线| 亚洲超碰97人人做人人爱| 成a人片国产精品| 久久综合狠狠综合| 麻豆国产精品777777在线| 欧美日韩中字一区| 一区二区三区四区av| www.在线欧美| 国产精品天美传媒| 成人av电影在线播放| 国产午夜亚洲精品羞羞网站| 蜜芽一区二区三区| 欧美日本一道本| 天堂资源在线中文精品| 欧美偷拍一区二区| 亚洲午夜精品久久久久久久久| 91亚洲精品久久久蜜桃| 国产精品区一区二区三区| 国产成人av一区二区| 亚洲精品在线三区| 国产精品77777竹菊影视小说| 日韩区在线观看| 极品少妇xxxx偷拍精品少妇| 日韩午夜三级在线| 另类小说综合欧美亚洲| 欧美v日韩v国产v| 国产在线观看免费一区| 精品国产百合女同互慰| 国产成人免费xxxxxxxx| 久久久精品影视| 国产美女视频一区| 中文字幕一区二区三区在线不卡 | 欧美午夜电影在线播放| 亚洲一二三区不卡| 欧美挠脚心视频网站| 美国十次综合导航| 久久你懂得1024| 99国产精品视频免费观看| 亚洲精品成人少妇| 欧美一区国产二区| 风流少妇一区二区| 亚洲午夜在线观看视频在线| 7799精品视频| 懂色中文一区二区在线播放| 亚洲私人影院在线观看| 6080国产精品一区二区| 黑人巨大精品欧美黑白配亚洲| 国产日产精品一区| 欧美亚洲国产一卡| 国产一区二区三区免费看 | 欧美一区二区播放| 国产麻豆精品theporn| 国产精品国产馆在线真实露脸| 91久久久免费一区二区| 蜜芽一区二区三区| 亚洲黄色免费网站| 久久久亚洲欧洲日产国码αv| 99久久精品久久久久久清纯| 午夜精品一区在线观看| 欧美经典一区二区三区| 欧美高清视频在线高清观看mv色露露十八 | 精品日韩欧美在线| 99久久精品免费| 精品无人区卡一卡二卡三乱码免费卡 | 精品99一区二区| 91成人国产精品| 国产成人免费高清| 日本不卡视频在线观看| 亚洲精品日韩一| 久久久久国产精品麻豆ai换脸 | 精品欧美一区二区久久| 91麻豆蜜桃一区二区三区| 韩国欧美一区二区| 肉丝袜脚交视频一区二区| 国产精品不卡在线| 久久丝袜美腿综合| 欧美日韩亚洲综合| 在线视频综合导航| 99在线精品一区二区三区| 欧美a级理论片| 亚洲午夜激情av| 亚洲欧美色一区| 1024亚洲合集| 中文字幕五月欧美| 国产色一区二区| 久久网这里都是精品| 7777精品伊人久久久大香线蕉的 | 国产精品福利av| 国产视频一区二区在线观看| 欧美草草影院在线视频| 欧美精品久久一区| 欧美日韩亚州综合| 欧美日韩一区二区三区视频| 色综合天天做天天爱| 91在线看国产| 色先锋aa成人| 91日韩在线专区| 一道本成人在线| 欧美色图天堂网| 欧美日韩一区二区三区在线| 欧美婷婷六月丁香综合色| 欧美色图激情小说| 欧美疯狂做受xxxx富婆| 欧美一区二区三区免费视频| 91精品国产综合久久久久久久 | 欧美激情艳妇裸体舞| 国产人妖乱国产精品人妖| 欧美国产视频在线| 自拍偷在线精品自拍偷无码专区| 成人免费在线视频| 免费成人结看片| 国产一区二区成人久久免费影院 | 精品一区二区在线播放| 精品一区二区日韩| 国产宾馆实践打屁股91| 91理论电影在线观看| 欧美日韩在线直播| 精品国产百合女同互慰| 国产精品国产自产拍高清av| 一区二区三区成人在线视频| 亚洲不卡av一区二区三区| 免费成人在线影院| 成人午夜视频福利| 欧美在线制服丝袜| 精品久久一区二区| 亚洲男人的天堂av| 久久激情综合网| 91一区一区三区| 884aa四虎影成人精品一区| 精品国产麻豆免费人成网站| 国产婷婷色一区二区三区在线| 《视频一区视频二区| 日韩精品亚洲一区二区三区免费| 久久99九九99精品| 91色porny在线视频| 日韩免费看的电影| 亚洲裸体xxx| 免费观看在线综合色| 成人深夜在线观看| 日韩一区二区免费电影| 1024精品合集| 国模无码大尺度一区二区三区| 91免费国产在线| 久久亚区不卡日本| 三级在线观看一区二区| 成人一区二区在线观看|