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

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

?? system.h

?? 用于以太網開發
?? H
字號:
#ifndef SYSTEM_H_INCLUDE
#define SYSTEM_H_INCLUDE

#include "os.h"
#include "ne64api.h"

#include <datatypes.h>
#include <globalvariables.h>


/** \def OPENTCP_VERSION
 *	\brief OpenTCP major version number
 *
 *	This define represents OpenTCP version information. Version
 *	is in the format MAJOR.MINOR.PATCH.
 */
#define OPENTCP_VERSION	"1.0.4"

/* Boolean	values*/
#define TRUE  1	/**< Boolean TRUE value as used in the OpenTCP */
#define FALSE 0	/**< Boolean FALSE value as used in the OpenTCP */

/**	\def NETWORK_TX_BUFFER_SIZE
 *	\ingroup opentcp_config
 *	\brief Transmit buffer size 
 *
 *	NETWORK_TX_BUFFER_SIZE defines the size of the network buffer
 *	used for data transmission by ICMP as well as TCP and UDP applications.
 *	
 *	See net_buf documentation for more reference on the shared transmit
 *	buffer.
 */
#define	NETWORK_TX_BUFFER_SIZE	1024			

/** \struct netif system.h
 *	\brief Network Interface declaration
 *
 *	This structure holds information about the network interface. This means
 *	that all of the network-related information are stored in this kind
 *	of structure.
 */
struct netif
{
	/** \brief IP address of a device
	 *
	 *	IP address of a happy device using OpenTCP :-). This must hold
	 *	proper-value IP address in order for the networking stuff to work.
	 *
	 *	Possible scenarios for filling this field are:
	 *		\li By assigning static IP address to a device always after reset
	 *		\li By allowing user to choose IP address by some tool (e.g. through
	 *		serial communication, storing that information to some external
	 *		flash,...)
	 *		\li By using BOOTP or DHCP clients for obtaining dynamically
	 *		assigned address
	 *		\li	By obtaining the IP address from the first ICMP packet
	 *		the device receives
	 *
	 *	First three approaches can also be used for obtaining gateway
	 *	and subnet-mask information.
	 */
	LWORD	localip;
	
	/** \brief Ethernet address given to a device
	 *
	 *	This array holds an Ethernet address assigned to a device. Note that
	 *	these must be unique so if you're shipping your product to outside
	 *	world you must purchase sufficient address range.
	 *
	 */
	BYTE 	localHW[6];
	
	/** \brief	Default network gateway
	 *
	 *	IP address of a default network gateway. This is needed if the
	 *	device is to communicate with the outside network (Internet) and
	 *	not only intranet.
	 */
	LWORD	defgw;
	
	/**	\brief	Network submask
	 *
	 * 	Network submask. Also needed if the the device is to communicate
	 *	with the outside network. Used when determining whether the 
	 *	host we're sending some data to is on the local network (send 
	 *	data directly) or not (send through gateway).
	 */
	LWORD	netmask;
};

/* System variable definitions	*/

#define	MASTER_MS_CLOCK		base_timer		/**< Interrupt driven msec free-running clock	*/
#define TXBUF	net_buf		/**< TXBUF points to transmit network buffer */

/*	System macros		*/

/**	\def RESET_SYSTEM
 *	\brief Macro used to reset the MCU
 *
 *	By default this macro is only an infinite loop and the system is 
 *	reset by the (presumably) running watchdog timer.
 *
 *	Change this if another form of reset is desired/needed.
 */
#define	RESET_SYSTEM()	for(;;) {}		/* Let the watchdog bite	*/

/**	\def OS_EnterCritical
 *	\brief Macro used to enter critical sections
 *	\todo 
 *		\li Move this to other arch-dependant place
 *
 *	This is highly dependant on the architecture that is used and/or
 *	possible operating system beeing used so it will be moved to some
 *	other place in the future.
 *
 *	Usually disabling globally interrupts works just fine :-)
 */
#define OS_EnterCritical	OS_ENTER_CRITICAL

/**	\def OS_ExitCritical
 *	\brief Macro used to exit critical sections
 *	\todo 
 *		\li Move this to other arch-dependant place
 *	
 *	This is highly dependant on the architecture that is used and/or
 *	possible operating system beeing used so it will be moved to some
 *	other place in the future.
 *
 *	For now this only globally enables interrupts
 */
#define	OS_ExitCritical		OS_EXIT_CRITICAL

/** \def RECEIVE_NETWORK_B
 *	\brief Use this macro to read data from Ethernet controller
 *
 *	This macro should be used to read data from the Ethernet
 *	controller. Procedure for doing this would be as follows:
 *		\li Initialize reading of data from certain address in the
 *		Ethernet controller (usually you will do that based on buf_index
 *		value of ip_frame, udp_frame or tcp_frame type of variables; 
 *		in certain special situations you can also use buf_index from 
 *		ethernet_frame type of var.
 *		\li Keep invoking RECEIVE_NETWORK_B() to read one byte at a time from
 *		the ethernet controller. Take care not to read more data than
 *		actually received
 *		\li If needed, reinitialize reading of data again and start all
 *		over again
 *		\li When finished discard the current frame in the Ethernet
 *		controller by invoking NETWORK_RECEIVE_END() macro
 *
 */
#define RECEIVE_NETWORK_B()				NE64ReadByte()

 /** \def RECEIVE_NETWORK_W
 *	\brief Use this macro to read data from Ethernet controller
 *
 *	This macro should be used to read data from the Ethernet
 *	controller. Procedure for doing this would be as follows:
 *		\li Initialize reading of data from certain address in the
 *		Ethernet controller (usually you will do that based on buf_index
 *		value of ip_frame, udp_frame or tcp_frame type of variables; 
 *		in certain special situations you can also use buf_index from 
 *		ethernet_frame type of var.
 *		\li Keep invoking RECEIVE_NETWORK_W() to read one word at a time from
 *		the ethernet controller. Take care not to read more data than
 *		actually received
 *		\li If needed, reinitialize reading of data again and start all
 *		over again
 *		\li When finished discard the current frame in the Ethernet
 *		controller by invoking NETWORK_RECEIVE_END() macro
 *
 */
#define RECEIVE_NETWORK_W()				NE64ReadWord()


/** \def RECEIVE_NETWORK_BUF
 *	\brief Use this macro to read data from Ethernet controller to a buffer
 *
 *	This macro should be used to read data from the Ethernet
 *	controller to a buffer in memory. Procedure for using this macro
 * is the same as for using RECEIVE_NETWORK_B() macro.
 *
 */
#define RECEIVE_NETWORK_BUF(c,d)		NE64ReadBytes(c,d)

/** \def SEND_NETWORK_B
 *	\brief Use this macro to write data to Ethernet controller
 *
 *	This macro should be used to write data to Ethernet
 *	controller. Procedure for doing this would be as follows:
 *		\li Initialize writing of data to certain address in the
 *		Ethernet controller. Buffer space in Ethernet controller is
 *		divided among the protocols in the following way:
 *			\li 256 byte Tx for ARP (see ARP_BUFFER )
 *			\li 1536 byte Tx for ICMP (see ICMP_BUF)
 *			\li 1536 byte Tx for TCP (see TCP_BUF)
 *			\li 1536 byte Tx for UDP (see UDP_BUF)
 *		\li Write the data by using SEND_NETWORK_B() macro
 *		\li When all of the data is written instruct the Ethernet controller
 *		to send the data by calling the NETWORK_COMPLETE_SEND() macro with
 *		number of bytes to send as a parameter
 *
 */
#define SEND_NETWORK_B(c) 				NE64WriteByte(c)


/** \def SEND_NETWORK_W
 *	\brief Use this macro to write data to Ethernet controller
 *
 *	This macro should be used to write data to Ethernet
 *	controller. Procedure for doing this would be as follows:
 *		\li Initialize writing of data to certain address in the
 *		Ethernet controller. Buffer space in Ethernet controller is
 *		divided among the protocols in the following way:
 *			\li 256 byte Tx for ARP (see ARP_BUFFER )
 *			\li 1536 byte Tx for ICMP (see ICMP_BUF)
 *			\li 1536 byte Tx for TCP (see TCP_BUF)
 *			\li 1536 byte Tx for UDP (see UDP_BUF)
 *		\li Write the data by using SEND_NETWORK_W() macro
 *		\li When all of the data is written instruct the Ethernet controller
 *		to send the data by calling the NETWORK_COMPLETE_SEND() macro with
 *		number of bytes to send as a parameter
 *
 */
#define SEND_NETWORK_W(c) 				NE64WriteWord(c)


/** \def SEND_NETWORK_BUF
 *	\brief Use this macro to write data from buffer to Ethernet controller
 *
 *	This macro should be used to write data from a buffer to Ethernet
 *	controller. Usage is the same as for the SEND_NETWORK_B() macro.
 */
#define SEND_NETWORK_BUF(c,d)			NE64WriteBytes(c,d)

/** \def NETWORK_CHECK_IF_RECEIVED
 *	\ingroup periodic_functions
 *	\brief Use this macro to check if there is recieved data in Ethernet controller
 *
 *	Invoke this macro periodically (see main_demo.c for example) to check
 *	if there is new data in the Ethernet controller.
 *
 *	If there is new data in the Ethernet controller, this macro (function
 *	that it points to that is) will return a value of TRUE and fill in
 *	the appropriate values in the received_frame variable. Otherwise it
 *	returns FALSE.
 */
#define NETWORK_CHECK_IF_RECEIVED() 	NE64ValidFrameReception()

/** \def NETWORK_RECEIVE_INITIALIZE
 *	\brief Initialize reading from a given address
 *
 *	This macro initializes reading of the received Ethernet frame from
 *	a given address in the Ethernet controller.
 */
#define NETWORK_RECEIVE_INITIALIZE(c)	NE64InitializeOffsetToReadRxBuffer(c)

/** \def NETWORK_RECEIVE_END
 *	\ingroup periodic_functions
 *	\brief Dump received packet in the Ethernet controller
 *
 *	Invoke this macro when the received Ethernet packet is not needed
 *	any more and can be discarded.
 */
#define NETWORK_RECEIVE_END() 			NE64FreeReceiveBuffer()

/** \def NETWORK_COMPLETE_SEND
 *	\brief Send the Ethernet packet that was formed in the Ethernet controller
 *
 *	After the data has been written to the Ethernet controller, use this
 *	function to instruct the Ethernet controller that data is in it's 
 *	internal buffer and should be sent.
 */
#define NETWORK_COMPLETE_SEND(c) 		NE64StartFrameTransmission(c)

/** \def NETWORK_SEND_INITIALIZE
 *	\brief Initialize sending of Ethernet packet from a given address
 *
 *	Use this function to initialize sending (or creating) of an Ethernet
 *	packet from a given address in the Ethernet controller.
 */
#define NETWORK_SEND_INITIALIZE(c) 		NE64InitializeTransmissionBuffer(c)

/** \def NETWORK_ADD_DATALINK
 *	\brief	Add lower-level datalink information
 *
 *	This implementation adds Ethernet data-link information by
 *	invoking NE2000WriteEthernetHeader() function that writes Ethernet
 *	header based on information provided (destination and source ethernet
 *	address and protocol field).
 */
#define NETWORK_ADD_DATALINK(c)			NE64WriteEthernetHeaderToTxBuffer((struct TEthernetFrame*)c)


/* System functions	*/

extern void   kick_WD          (void);
extern void   wait             (INT16);
extern void   enter_power_save (void);
extern void   exit_power_save  (void);
extern INT16  __strlen         (UINT8*, UINT16);
extern INT16  bufsearch        (UINT8*, UINT16, UINT8*);
extern UINT16 hextoascii       (UINT8);
extern void   __itoa           (UINT16, UINT8*);
extern void   __ltoa           (UINT32, UINT8*);
extern INT16  __atoi           (UINT8*, UINT8);
extern UINT8  asciitohex       (UINT8);
extern UINT8  isnumeric        (UINT8);
extern void   mputs            (INT8*);
void          mputhex          (UINT8);
extern UINT32 random           (void);
extern void   dummy            (void);

/*	External functions	*/

extern void init(void);


#endif





?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产呦精品一区二区三区网站| 视频一区在线播放| 激情文学综合网| 国产精品美女久久久久aⅴ国产馆| www.一区二区| 五月激情综合色| 欧美日韩精品一区二区天天拍小说| 国产高清亚洲一区| 亚洲va欧美va人人爽午夜 | 欧美一区二区三区成人| 成人晚上爱看视频| 亚洲国产精品麻豆| 国产免费久久精品| 欧美一区二区三区免费在线看| eeuss鲁片一区二区三区在线看| 天天综合色天天综合| 国产欧美日韩视频一区二区 | 色哟哟国产精品| 一个色在线综合| 国产欧美日本一区二区三区| 欧美日韩综合在线免费观看| 国产经典欧美精品| 日本午夜一本久久久综合| 亚洲免费在线播放| 国产午夜亚洲精品不卡| 欧美性一区二区| 91在线码无精品| 成人高清视频在线| 成人一区二区在线观看| 老汉av免费一区二区三区| 三级久久三级久久| 亚洲精品国产一区二区三区四区在线| 欧美精品一区二| 欧美丰满美乳xxx高潮www| 欧美唯美清纯偷拍| 91成人免费在线视频| 99久久精品情趣| 激情综合色播激情啊| 久久精品噜噜噜成人88aⅴ| 亚洲午夜羞羞片| 亚洲蜜臀av乱码久久精品| 国产精品伦一区| 国产精品沙发午睡系列990531| 欧美成人高清电影在线| 欧美精品 日韩| 欧美一区三区四区| 欧美日韩国产免费一区二区 | 久久精品国产99国产精品| 亚洲电影在线播放| 亚洲综合精品自拍| 亚洲精品综合在线| 一个色在线综合| 亚洲午夜激情网页| 亚洲高清中文字幕| 日本不卡高清视频| 久久精品国产一区二区三区免费看 | 成人h动漫精品| 东方aⅴ免费观看久久av| 国产一区二区三区免费看| 国产美女娇喘av呻吟久久| 久久福利资源站| 国产一区二区伦理| 国产精品88888| 国产中文字幕精品| 国产成人激情av| 粉嫩av一区二区三区在线播放| 国产激情一区二区三区四区| 91香蕉视频污| 欧美在线观看视频在线| 欧美日韩免费一区二区三区| 欧美日韩国产高清一区二区三区| 精品久久久久99| 国产日韩欧美制服另类| 欧美国产日韩a欧美在线观看| 国产日韩视频一区二区三区| 亚洲综合视频在线| 日韩在线一二三区| 九九视频精品免费| 国产一区二区在线观看视频| 91麻豆视频网站| 欧美日韩国产免费一区二区 | 国产日韩欧美精品电影三级在线| 亚洲国产电影在线观看| 亚洲精品v日韩精品| 亚洲电影中文字幕在线观看| 国产精品一线二线三线精华| 色综合婷婷久久| 欧美美女直播网站| 精品成a人在线观看| 亚洲免费在线观看视频| 日本人妖一区二区| 国产成人在线视频网址| 91天堂素人约啪| 欧美电视剧在线观看完整版| 中文一区在线播放| 亚洲成人免费在线观看| 国产精品一区二区免费不卡| 久久97超碰国产精品超碰| 99久久精品国产导航| 欧美一级日韩不卡播放免费| 国产精品三级av在线播放| 一区二区高清视频在线观看| 日韩在线卡一卡二| 97久久超碰国产精品电影| 国产精品综合在线视频| 91精品国产综合久久小美女 | 一区二区三区在线看| 亚洲激情欧美激情| 成人ar影院免费观看视频| 欧美日韩情趣电影| 亚洲国产高清在线| 蜜臀av国产精品久久久久 | 成人久久视频在线观看| 欧美日韩美少妇| 国产精品久久久久9999吃药| 蜜臀av一区二区在线免费观看| 一本一道波多野结衣一区二区| 国产网红主播福利一区二区| 美国av一区二区| 777欧美精品| 五月综合激情网| 欧美视频精品在线观看| 亚洲精品日日夜夜| 国产成人av电影在线观看| 8v天堂国产在线一区二区| 亚洲大片免费看| 欧美色精品在线视频| 亚洲精品日韩综合观看成人91| 成人一区二区三区中文字幕| 欧美韩国日本综合| 国产精品一区三区| 久久婷婷国产综合国色天香| 国内国产精品久久| 久久亚洲捆绑美女| 国产一区三区三区| 久久综合久久综合久久| 老鸭窝一区二区久久精品| 日韩欧美国产麻豆| 麻豆精品一区二区三区| 欧美草草影院在线视频| 国内精品免费**视频| 久久久久久久久岛国免费| 国产剧情在线观看一区二区| 国产日韩欧美a| 91小视频免费看| 亚洲第一激情av| 日韩视频在线永久播放| 国内精品在线播放| 欧美激情在线观看视频免费| 成人av在线观| 国产91精品欧美| 国产精品久久久久久久久快鸭 | 中文字幕在线不卡视频| 97精品久久久午夜一区二区三区| 亚洲色图在线看| 欧美精品久久天天躁| 欧美国产综合色视频| 在线观看亚洲精品| 国产福利视频一区二区三区| 亚洲一区二区欧美激情| 久久嫩草精品久久久久| 欧美在线综合视频| 国产精品996| 日韩不卡一二三区| 亚洲精品中文字幕在线观看| 久久久亚洲综合| 欧美一区二区大片| 欧洲色大大久久| 国产福利一区在线| 美国三级日本三级久久99| 夜夜嗨av一区二区三区网页 | 久久精品水蜜桃av综合天堂| 欧美午夜精品一区二区蜜桃 | 日韩欧美一区二区久久婷婷| 99久久国产免费看| 国产精品18久久久| 久久电影国产免费久久电影| 亚洲一区二区欧美激情| 综合激情成人伊人| 国产欧美一区二区三区在线老狼 | 一区二区三区四区国产精品| 亚洲国产精华液网站w| www国产成人| 日韩精品一区在线| 欧美日韩国产a| 色妞www精品视频| 成人精品亚洲人成在线| 国产美女精品在线| 久久激情五月激情| 日本成人在线电影网| 亚洲国产你懂的| 亚洲精品视频在线| 一区二区三区免费网站| 国产精品久久久久aaaa樱花| 国产女人18毛片水真多成人如厕| 久久新电视剧免费观看| 精品捆绑美女sm三区| 日韩亚洲欧美综合| 欧美一区二区三区日韩视频| 欧美一区二区三区四区在线观看|