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

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

?? main.c

?? 最新版FreeRTOS, 包擴(kuò)多種開發(fā)平臺(tái)的移植
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
									   };

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

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美一二三| 国产一区二区三区在线观看免费视频| 久久久蜜臀国产一区二区| 欧美丰满嫩嫩电影| 日韩美女一区二区三区四区| 亚洲精品一区二区在线观看| 欧美电影免费提供在线观看| 欧美男人的天堂一二区| 欧美另类高清zo欧美| 欧美精品久久天天躁| 欧美男生操女生| 久久久久久**毛片大全| 国产精品视频在线看| 自拍偷拍亚洲综合| 麻豆精品精品国产自在97香蕉 | 五月天精品一区二区三区| 久久国内精品视频| av亚洲精华国产精华精| 91麻豆精品国产91久久久使用方法| 色综合天天天天做夜夜夜夜做| 在线影院国内精品| 欧美成人高清电影在线| 1区2区3区欧美| 国产激情视频一区二区在线观看| 99久久精品国产一区| 在线成人高清不卡| 国产精品每日更新| 免费不卡在线视频| 成人看片黄a免费看在线| 欧美喷水一区二区| 一区二区三区中文字幕精品精品| 久88久久88久久久| 91美女片黄在线观看| 国产精品人人做人人爽人人添| 亚洲成人先锋电影| 91视视频在线直接观看在线看网页在线看| 欧美三级在线看| 中文字幕一区二区三区在线观看| 亚洲精品国产成人久久av盗摄| 国内精品视频一区二区三区八戒| 欧美视频在线一区| 亚洲欧美乱综合| 99精品视频在线免费观看| 日韩欧美成人午夜| 美腿丝袜亚洲综合| 精品国精品国产尤物美女| 天天综合天天综合色| 欧美一区三区四区| 激情都市一区二区| 中文字幕乱码亚洲精品一区| 国产91精品久久久久久久网曝门| 精品精品国产高清一毛片一天堂| 国产成人免费av在线| 久久久另类综合| 粉嫩久久99精品久久久久久夜| 欧美高清在线视频| 欧美日韩国产乱码电影| 日韩激情一二三区| 国产精品色一区二区三区| 99久久精品费精品国产一区二区| 一区二区三区国产| 久久综合国产精品| 欧美日韩一区高清| 不卡一区二区在线| 午夜精品久久久久久久久久久| 欧美日本韩国一区| 成人深夜在线观看| 奇米影视在线99精品| 国产精品久久免费看| 欧美精品九九99久久| 粗大黑人巨茎大战欧美成人| 亚洲高清免费视频| 国产日韩欧美精品一区| 7777精品伊人久久久大香线蕉经典版下载| 国产一区欧美一区| 午夜精品爽啪视频| 最新高清无码专区| 国产喷白浆一区二区三区| 日韩免费视频线观看| 欧美三级日韩三级| 一本大道av一区二区在线播放| 狠狠色丁香久久婷婷综合_中 | 亚洲猫色日本管| 亚洲久本草在线中文字幕| 精品欧美一区二区久久| 欧美性猛交xxxx乱大交退制版| 99久久国产免费看| 91精品办公室少妇高潮对白| 成人午夜av在线| 国产精品正在播放| 99免费精品在线观看| 国产不卡视频在线播放| av亚洲精华国产精华精| 成人av免费在线播放| 国产福利一区二区三区| 国产精品1024久久| 丁香婷婷综合色啪| 国产伦精一区二区三区| 国产福利一区二区| 大陆成人av片| 91视频在线看| 欧美日韩高清一区二区三区| 日韩视频免费观看高清完整版| 日韩欧美一二三四区| 欧美日韩高清在线| 日韩精品一区二区三区蜜臀| 国产婷婷一区二区| 亚洲图片自拍偷拍| 成人午夜激情在线| 日韩一区二区在线观看视频 | 日韩国产精品久久久久久亚洲| 久久69国产一区二区蜜臀| 91理论电影在线观看| 欧美男人的天堂一二区| 亚洲欧洲av在线| 国产揄拍国内精品对白| 欧美色图天堂网| 中文字幕一区二区三中文字幕| 蜜臀va亚洲va欧美va天堂| 国产精品乡下勾搭老头1| 91精品国产综合久久久久| 一区二区高清免费观看影视大全| 国产在线国偷精品产拍免费yy| 欧美三级电影网| 亚洲一区欧美一区| 91啪在线观看| 亚洲蜜臀av乱码久久精品蜜桃| 国产九色精品成人porny| 精品日韩99亚洲| 三级欧美韩日大片在线看| 一本一本久久a久久精品综合麻豆| 精品国产乱码久久久久久蜜臀| 久久不见久久见中文字幕免费| 91麻豆精品国产91久久久使用方法| 亚洲一区日韩精品中文字幕| 色老汉一区二区三区| 亚洲一卡二卡三卡四卡| 在线观看日韩av先锋影音电影院| 一区二区三区美女视频| 欧美日本一区二区在线观看| 日韩高清一区二区| 26uuu久久天堂性欧美| 色综合中文字幕| 亚洲国产精品天堂| 日韩一区二区三区观看| 国产99久久久国产精品免费看 | 精品视频一区三区九区| 国产一区二区三区在线看麻豆| 午夜精品一区二区三区免费视频| 亚洲国产精品成人综合| 欧美激情综合五月色丁香小说| 日韩视频免费观看高清完整版在线观看 | 欧美理论电影在线| av在线不卡电影| 激情五月激情综合网| 一区二区欧美精品| 国产日韩精品一区| 日韩视频中午一区| 欧美在线免费播放| 91丝袜美腿高跟国产极品老师 | 中文一区一区三区高中清不卡| 欧美人与禽zozo性伦| 在线视频你懂得一区| 成人性生交大片免费看中文| 日韩精品成人一区二区三区| 亚洲黄色av一区| 亚洲欧美怡红院| 久久久久久久网| 国产日韩亚洲欧美综合| 久久蜜桃一区二区| 久久久久9999亚洲精品| 亚洲精品一区二区三区精华液| 欧美日韩aaa| 日韩一区二区三区电影在线观看| 91超碰这里只有精品国产| 欧美日韩国产一级| 欧美日韩一区小说| 国产视频在线观看一区二区三区 | 免费精品视频最新在线| 日韩视频一区二区在线观看| 国产一区二区不卡在线 | 欧美在线免费观看视频| 狠狠色丁香婷婷综合| 免费三级欧美电影| 美日韩一区二区三区| 美国毛片一区二区三区| 国产91对白在线观看九色| 处破女av一区二区| 欧美色精品在线视频| 日韩一区二区三区电影在线观看 | 国产成人啪午夜精品网站男同| 国产精品一区二区果冻传媒| 成a人片国产精品| 欧美麻豆精品久久久久久| 久久众筹精品私拍模特| 国产精品第一页第二页第三页| 亚洲一区av在线| 岛国av在线一区| 日韩精品中文字幕一区二区三区 | 国产精品资源站在线|