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

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

?? uip_task.c

?? FreeRTOS V4.2.1,增加了AVR32 UC3 和 LPC2368 的支持
?? C
字號:
/*
 * 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 $
 *
 */


#include <stdlib.h>   /* For system(). */
#include <stdio.h>    /* For printf(). */

#include "FreeRTOS.h"
#include "task.h"

#undef HTONS

#include "cs8900a.h"
#include "uip.h"
#include "uip_arp.h"
#include "tapdev.h"
#include "httpd.h"

static const struct uip_eth_addr ethaddr = {{0x00,0x00,0xe2,0x58,0xb6,0x6b}};

#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
#define uipSHORT_DELAY		( ( portTickType ) 2 / portTICK_RATE_MS )

#ifndef NULL
#define NULL (void *)0
#endif /* NULL */

static volatile portTickType start, current;

#define RT_CLOCK_SECOND ( configTICK_RATE_HZ / 2 )

/*-----------------------------------------------------------------------------------*/
/**
 * \internal
 * A real-time clock.
 *
 * This example main() function uses polling of a real-time clock in
 * order to know when the periodic processing should be
 * performed. This is implemented using this function - rt_ticks(). In
 * this example unix implementation, it simply calls the unix function
 * gettimeofday() which returns the current wall clock time.
 *
 * For a micro-controller, a simple way to implement this function is
 * by having a counter that is incremented by a timer interrupt and
 * read by this function.
 * 
 * The macro RT_CLOCK_SECOND should be defined as the approximate
 * number of ticks that are elapsed during one second. 
 */
#define rt_ticks xTaskGetTickCount

/*-----------------------------------------------------------------------------------*/
void vuIP_TASK( void *pvParameters )
{
u8_t i, arptimer;
u16_t addr[2];
int z = 3;

	/* Initialize the uIP TCP/IP stack. */
	uip_init();
	uip_arp_init();

	/* Initialize the device driver. */ 
	cs8900a_init();

	/* Initialize the HTTP server. */
	httpd_init();

	start = rt_ticks();
	arptimer = 0;
  
	while(1) 
	{
		/* 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 = cs8900a_poll();

		if(uip_len > 0) 
		{
			/* A packet is present in the packet 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(BUF->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();
					cs8900a_send();
				}
			} 
			else if(BUF->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) 
				{	
					cs8900a_send();
				}
			}
		} 
		else 
		{
			/* The poll function returned 0, so no packet was
			received. Instead we check if there is time that we do the
			periodic processing. */
			current = rt_ticks();

			if((u16_t)(current - start) >= (u16_t)RT_CLOCK_SECOND / 2) 
			{
				start = current;

				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();
						cs8900a_send();
					}
				}

				#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 */

				/* Call the ARP timer function every 10 seconds. */
				if(++arptimer == 20) 
				{	
					uip_arp_timer();
					arptimer = 0;
				}
			}
			else
			{
				vTaskDelay( uipSHORT_DELAY );
		}   }
	}
}
/*-----------------------------------------------------------------------------------*/




?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人午夜电影| 精品少妇一区二区三区日产乱码| 91麻豆国产在线观看| 欧美大片日本大片免费观看| 欧美老肥妇做.爰bbww视频| 欧洲精品一区二区| 欧美三级欧美一级| 91精品国产一区二区三区 | 精品国产sm最大网站免费看| 欧美xxxx在线观看| 久久一区二区视频| 国产女人aaa级久久久级 | 午夜精品一区在线观看| 亚洲国产另类av| 日本中文字幕一区| 国产一区视频导航| www.日韩av| 欧美日韩成人综合天天影院| 宅男噜噜噜66一区二区66| 精品国产三级a在线观看| 久久久精品黄色| 亚洲精品中文在线| 免费在线欧美视频| 成人高清免费观看| 欧美体内she精视频| 日韩视频123| 中文字幕第一区综合| 亚洲最大成人综合| 日韩av中文字幕一区二区三区| 国产精品一二三四| 在线精品视频免费观看| 精品欧美一区二区久久| 亚洲桃色在线一区| 蜜臀久久久久久久| 99视频在线精品| 日韩欧美一级二级| 亚洲免费观看高清| 久久激情五月婷婷| 一本大道av伊人久久综合| 精品捆绑美女sm三区| 综合电影一区二区三区 | 亚洲.国产.中文慕字在线| 韩国成人精品a∨在线观看| 色悠久久久久综合欧美99| 欧美zozo另类异族| 亚洲午夜视频在线| bt7086福利一区国产| 日韩欧美国产午夜精品| 亚洲激情欧美激情| 国产 日韩 欧美大片| 5月丁香婷婷综合| 亚洲欧洲日韩av| 国产精品一区在线观看乱码| 8x福利精品第一导航| 亚洲图片欧美激情| 懂色一区二区三区免费观看| 欧美一卡在线观看| 亚洲高清免费一级二级三级| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 色综合天天综合网国产成人综合天 | 国产女人18毛片水真多成人如厕| 日韩在线观看一区二区| 91久久精品一区二区三| 欧美极品xxx| 国产成人99久久亚洲综合精品| 日韩欧美一区在线| 日韩经典一区二区| 欧美日韩www| 亚洲成人久久影院| 欧美色大人视频| 亚洲综合偷拍欧美一区色| 欧美性色黄大片| 中文字幕在线一区免费| 国产成人在线色| 国产午夜精品福利| 国产成人av电影免费在线观看| 精品国产一区二区三区四区四 | 久久色.com| 国产一区二区三区免费在线观看| 欧美成人精品高清在线播放| 蜜臀av一区二区| 精品福利一二区| 国产一区91精品张津瑜| 久久久99精品久久| 丁香啪啪综合成人亚洲小说 | 欧美一区二区女人| 免费人成精品欧美精品| 欧美一级在线视频| 九九精品一区二区| 久久久久久97三级| av电影在线观看一区| 夜夜嗨av一区二区三区中文字幕| 欧美做爰猛烈大尺度电影无法无天| 洋洋av久久久久久久一区| 欧美人牲a欧美精品| 久久99久久久久久久久久久| 久久久五月婷婷| 一本到不卡精品视频在线观看| 亚洲午夜久久久| 精品入口麻豆88视频| 成人精品国产福利| 亚洲成a天堂v人片| 精品国产伦一区二区三区观看体验 | 风流少妇一区二区| 亚洲美女电影在线| 91精品久久久久久蜜臀| 国产精品一区二区男女羞羞无遮挡| 欧美激情艳妇裸体舞| 欧美在线视频日韩| 精品在线播放午夜| 亚洲男人天堂av网| 欧美电影免费观看高清完整版| 国产麻豆成人传媒免费观看| 一区二区三区日韩欧美精品| 日韩欧美高清一区| 91美女蜜桃在线| 狠狠网亚洲精品| 一区二区三区鲁丝不卡| 久久久久久久精| 欧美亚洲国产一区二区三区va| 国产主播一区二区| 亚洲成人精品影院| 中文字幕日韩欧美一区二区三区| 6080午夜不卡| 在线看一区二区| 成人h动漫精品| 久久成人综合网| 亚洲国产欧美在线| 最新热久久免费视频| 欧美成人vr18sexvr| 欧美视频中文字幕| 91麻豆国产福利精品| 国产一区二区精品久久91| 日韩高清国产一区在线| 一区二区三区中文字幕电影| 久久久久久99精品| 精品国偷自产国产一区| 欧美三级电影在线看| 91丨porny丨蝌蚪视频| 国产精品亚洲第一区在线暖暖韩国| 三级欧美在线一区| 一区二区三区波多野结衣在线观看| 国产精品麻豆网站| 久久久蜜桃精品| 亚洲精品在线电影| 精品久久久久久亚洲综合网| 欧美一区二区三区日韩视频| 欧美日韩一区精品| 欧美在线观看一区二区| 欧美在线色视频| 欧美性三三影院| 欧美亚日韩国产aⅴ精品中极品| 色天天综合色天天久久| 97久久久精品综合88久久| 51精品国自产在线| 欧美伊人久久久久久午夜久久久久| 成人精品国产一区二区4080| av亚洲精华国产精华| 99久久久久久99| 色综合久久中文字幕综合网| 91麻豆免费在线观看| 在线免费观看日本一区| 欧美三级三级三级| 日韩一区二区三区视频| 欧美第一区第二区| 欧美精品一区二区不卡 | 国产欧美一区二区三区沐欲| 国产欧美一区二区在线观看| 国产精品美女久久久久久久 | 亚洲国产另类av| 蜜臀av亚洲一区中文字幕| 国内精品伊人久久久久av影院| 久久99国产精品成人| 国产成人免费9x9x人网站视频| 高清不卡一二三区| 91香蕉视频污在线| 欧美日韩国产欧美日美国产精品| 在线不卡一区二区| 久久综合九色综合久久久精品综合| 久久夜色精品一区| 亚洲色图在线看| 日韩精品一二三区| 国产精品88888| 日本高清不卡一区| 精品88久久久久88久久久 | 不卡的av在线| 欧美日韩高清不卡| 日本一区二区三区视频视频| 亚洲区小说区图片区qvod| 日韩精品亚洲一区| 成人国产精品免费| 欧美一级爆毛片| 国产精品高潮久久久久无| 午夜私人影院久久久久| 国产成人免费视频精品含羞草妖精| 91福利视频网站| 国产欧美一区二区精品秋霞影院 | 成人免费视频一区二区| 欧美日韩成人综合天天影院 | 在线免费av一区|