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

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

?? uip_task.c

?? IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR IAR
?? C
字號(hào):
/*
 * Modified from an original work that is Copyright (c) 2001-2003, Adam Dunkels.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote
 *    products derived from this software without specific prior
 *    written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * This file is part of the uIP TCP/IP stack.
 *
 * $Id: main.c,v 1.10.2.4 2003/10/21 21:27:51 adam Exp $
 *
 */

/* Standard includes. */
#include <stdlib.h>
#include <stdio.h>

/* Scheduler includes. */
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"

/* Demo app includes. */
#include "SAM7_EMAC.h"

/* uIP includes. */
#undef HTONS
#include "uip.h"
#include "uip_arp.h"
#include "tapdev.h"

#include "httpd.h"

/* The start of the uIP buffer, which will contain the frame headers. */
#define pucUIP_Buffer ( ( struct uip_eth_hdr * ) &uip_buf[ 0 ] )

/* uIP update frequencies. */
#define RT_CLOCK_SECOND		( configTICK_RATE_HZ  )
#define uipARP_FREQUENCY	( 20 )
#define uipMAX_BLOCK_TIME	( RT_CLOCK_SECOND / 4 )




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

void vuIP_TASK( void *pvParameters )
{
    
  
/* The semaphore used by the EMAC ISR to indicate that an Rx frame is ready
for processing. */
xSemaphoreHandle xSemaphore = NULL;
portBASE_TYPE xARPTimer;
unsigned portBASE_TYPE uxPriority;
static volatile portTickType xStartTime, xCurrentTime;

	/* Initialize the uIP TCP/IP stack. */
	uip_init();
	uip_arp_init();
	
	/* Initialize the HTTP server. */
	httpd_init();
      
               
	/* Initialise the local timers. */
	xStartTime = xTaskGetTickCount();
	xARPTimer = 0;

	/* Initialise the EMAC.  A semaphore will be returned when this is
	successful. This routine contains code that polls status bits.  If the
	Ethernet cable is not plugged in then this can take a considerable time.
	To prevent this starving lower priority tasks of processing time we
	lower our priority prior to the call, then raise it back again once the
	initialisation is complete. */
	uxPriority = uxTaskPriorityGet( NULL );
	vTaskPrioritySet( NULL, tskIDLE_PRIORITY );
	while( xSemaphore == NULL )
	{
		xSemaphore = xEMACInit();
	}
	vTaskPrioritySet( NULL, uxPriority );

	for( ;; )
	{
		/* Let the network device driver read an entire IP packet
		into the uip_buf. If it returns > 0, there is a packet in the
		uip_buf buffer. */
		uip_len = ulEMACPoll();

		/* Was a packet placed in the uIP buffer? */
		if( uip_len > 0 )
		{
			/* A packet is present in the uIP buffer. We call the
			appropriate ARP functions depending on what kind of packet we
			have received. If the packet is an IP packet, we should call
			uip_input() as well. */
			if( pucUIP_Buffer->type == htons( UIP_ETHTYPE_IP ) )
			{
				uip_arp_ipin();
				uip_input();

				/* If the above function invocation resulted in data that
				should be sent out on the network, the global variable
				uip_len is set to a value > 0. */
				if( uip_len > 0 )
				{
					uip_arp_out();
					lEMACSend();
				}
			}
			else if( pucUIP_Buffer->type == htons( UIP_ETHTYPE_ARP ) )
			{
				uip_arp_arpin();

				/* If the above function invocation resulted in data that
				should be sent out on the network, the global variable
				uip_len is set to a value > 0. */	
				if( uip_len > 0 )
				{	
					lEMACSend();
				}
			}
		}
		else
		{
			/* The poll function returned 0, so no packet was
			received. Instead we check if it is time that we do the
			periodic processing. */
			xCurrentTime = xTaskGetTickCount();

			if( ( xCurrentTime - xStartTime ) >= RT_CLOCK_SECOND )
			{
				portBASE_TYPE i;

				/* Reset the timer. */
				xStartTime = xCurrentTime;

				/* Periodic check of all connections. */
				for( i = 0; i < UIP_CONNS; i++ )
				{
					uip_periodic( i );

					/* If the above function invocation resulted in data that
					should be sent out on the network, the global variable
					uip_len is set to a value > 0. */					
					if( uip_len > 0 )
					{
						uip_arp_out();
						lEMACSend();
					}
				}

				#if UIP_UDP
					for( i = 0; i < UIP_UDP_CONNS; i++ )
					{
						uip_udp_periodic( i );

						/* If the above function invocation resulted in data that
						should be sent out on the network, the global variable
						uip_len is set to a value > 0. */
						if( uip_len > 0 )
						{
							uip_arp_out();
							tapdev_send();
						}
					}
				#endif /* UIP_UDP */

				/* Periodically call the ARP timer function. */
				if( ++xARPTimer == uipARP_FREQUENCY )
				{	
					uip_arp_timer();
					xARPTimer = 0;
				}
			}
			else
			{				
				/* We did not receive a packet, and there was no periodic
				processing to perform.  Block for a fixed period.  If a packet
				is received during this period we will be woken by the ISR
				giving us the Semaphore. */
				xSemaphoreTake( xSemaphore, uipMAX_BLOCK_TIME );
			}
		}
	}
}
/*-----------------------------------------------------------------------------------*/





?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩精品一区二区三区在线| 色8久久人人97超碰香蕉987| 日韩欧美综合一区| 日韩精品成人一区二区在线| 欧美日本乱大交xxxxx| 午夜精品久久久| 3d动漫精品啪啪1区2区免费| 免费在线观看成人| www一区二区| 99精品国产91久久久久久| 亚洲天堂2014| 欧美久久免费观看| 久久99国产精品麻豆| 久久蜜桃一区二区| 99国产精品久久久久| 一区二区免费看| 欧美一卡二卡三卡四卡| 国产福利91精品| 亚洲美腿欧美偷拍| 日韩女同互慰一区二区| 国产成人午夜电影网| 亚洲九九爱视频| 日韩久久精品一区| av在线不卡免费看| 日本中文字幕不卡| 国产精品午夜在线| 在线播放国产精品二区一二区四区| 奇米精品一区二区三区在线观看一 | 欧美精品一区二区三区视频| 国产91丝袜在线播放九色| 亚洲影视在线播放| 久久综合色播五月| 欧美日韩在线一区二区| 国产精品一区二区三区乱码| 亚洲综合色丁香婷婷六月图片| 日韩欧美精品在线| 在线观看日韩精品| 国产高清精品久久久久| 午夜精品久久久久久不卡8050| 国产欧美一区二区精品性色| 欧美剧情片在线观看| 成人免费看的视频| 久久不见久久见免费视频7| 国产精品久久三区| 久久综合色播五月| 9191国产精品| 色婷婷综合久久久中文字幕| 国产伦精品一区二区三区在线观看 | 一区免费观看视频| 欧美xxxxxxxx| 欧美日韩二区三区| 色菇凉天天综合网| 成人免费毛片高清视频| 裸体在线国模精品偷拍| 亚洲成人av电影| 亚洲婷婷综合久久一本伊一区 | 在线免费av一区| 99久久精品99国产精品| 国产精品538一区二区在线| 天堂影院一区二区| 亚洲韩国一区二区三区| 日韩毛片一二三区| 国产精品网站导航| 日本一区二区高清| 久久久久久久久久电影| 精品99一区二区| 日韩欧美综合一区| 日韩亚洲欧美在线观看| 欧美一区二区在线看| 在线成人免费观看| 91麻豆精品国产91久久久 | 中文字幕一区免费在线观看| 久久精品夜色噜噜亚洲aⅴ| 日韩精品一区二区三区视频播放 | 麻豆91在线观看| 日韩高清不卡一区| 日本在线不卡视频| 日韩电影免费在线看| 日本特黄久久久高潮| 日韩精品乱码av一区二区| 午夜a成v人精品| 亚洲成a人v欧美综合天堂下载| 亚洲一本大道在线| 日韩黄色小视频| 蜜臀av性久久久久av蜜臀妖精 | 久久先锋资源网| 久久久亚洲国产美女国产盗摄| 久久先锋影音av鲁色资源| 国产午夜亚洲精品理论片色戒| 国产视频911| 国产精品理伦片| 一区二区三区四区中文字幕| 亚洲国产精品麻豆| 日本欧美一区二区在线观看| 日本人妖一区二区| 国产福利一区二区三区视频在线| www.亚洲在线| 在线欧美日韩国产| 911精品产国品一二三产区| 精品久久久久久久久久久久包黑料| 精品日韩av一区二区| 中文字幕精品一区二区精品绿巨人| 国产精品久久久久久久午夜片| 亚洲视频一区二区在线| 亚洲成人动漫在线观看| 国模无码大尺度一区二区三区| 国产成人精品一区二| 91老师国产黑色丝袜在线| 欧美日韩mp4| 久久精品欧美一区二区三区不卡 | 精品久久久久久无| 日韩一区在线播放| 天天综合色天天综合色h| 精品在线亚洲视频| 91在线高清观看| 欧美一区二区啪啪| 国产精品毛片无遮挡高清| 亚洲第一久久影院| 国产成人精品免费网站| 欧洲色大大久久| 久久久激情视频| 午夜久久久久久电影| 国产成都精品91一区二区三| 色婷婷av一区二区三区大白胸| 精品理论电影在线| 亚洲精品视频在线观看免费| 久久99日本精品| 色综合久久88色综合天天免费| 精品动漫一区二区三区在线观看| 亚洲欧洲三级电影| 国内精品国产三级国产a久久| 91精品办公室少妇高潮对白| 久久一二三国产| 天天综合网 天天综合色| 99久久精品国产一区二区三区| 日韩精品一区二区三区四区 | 亚洲成人自拍一区| fc2成人免费人成在线观看播放| 欧美一级在线免费| 亚洲精品你懂的| 成人性色生活片| 精品剧情v国产在线观看在线| 亚洲一区二区av电影| 成人不卡免费av| 精品99一区二区三区| 麻豆精品一区二区三区| 欧美久久久影院| 亚洲午夜一区二区| 色婷婷国产精品综合在线观看| 国产三级精品视频| 韩国一区二区三区| 日韩精品一区二区在线观看| 三级影片在线观看欧美日韩一区二区 | 国产亚洲精品aa午夜观看| 美女视频网站久久| 欧美夫妻性生活| 婷婷国产在线综合| 在线视频一区二区三区| 亚洲美女在线国产| 色综合久久天天| 一区二区三区视频在线看| 91欧美一区二区| 综合分类小说区另类春色亚洲小说欧美| 韩国理伦片一区二区三区在线播放| 欧美日本精品一区二区三区| 亚洲电影激情视频网站| 欧美日韩国产123区| 日精品一区二区三区| 日韩午夜激情av| 久久精品久久99精品久久| 欧美va亚洲va| 国产精品自在欧美一区| 久久综合九色综合97_久久久 | eeuss鲁片一区二区三区在线观看| 久久久久综合网| 国产不卡视频在线观看| 中文字幕不卡在线| 色婷婷国产精品| 亚洲永久免费视频| 欧美一区三区二区| 国产真实乱对白精彩久久| 国产色综合久久| 91亚洲精品乱码久久久久久蜜桃| 亚洲人精品一区| 欧美在线免费视屏| 奇米一区二区三区av| 久久久一区二区三区| 不卡一区中文字幕| 亚洲自拍偷拍网站| 欧美一区二区三区四区五区| 国产一区久久久| 国产精品久久久久久久久晋中 | 性做久久久久久久免费看| 欧美一区二区黄| 成人一二三区视频| 亚洲激情在线播放| 精品国产乱码久久久久久1区2区 | 欧美亚洲国产一区二区三区va| 视频一区视频二区在线观看| 久久午夜电影网|