⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cs8900if.h

📁 LwIP adaptation for Fujitsu MB90f497 and CS8900A Ethernet driver
💻 H
字号:
/* * Copyright (c) 2001 Leon Woestenberg <leon.woestenberg@axon.nl>
 * Copyright (c) 2001 Axon Digital Design B.V., The Netherlands.
 * All rights reserved. *
 * This is a device driver for the Crystal Semiconductor CS8900 * chip in combination with the lwIP stack.
 *
 * This is work under development. Please coordinate changes
 * and requests with Leon Woestenberg <leon.woestenberg@axon.nl>
 *
 * The Swedish Institute of Computer Science and Adam Dunkels
 * are specifically granted permission to redistribute this
 * source code under any conditions they seem fit.
 *
 */
#ifndef __NETIF_CS8900IF_H__#define __NETIF_CS8900IF_H__#include "netif.h"
/* interface statistics gathering
 * such as collisions, dropped packets, missed packets
 * 0 = no statistics, minimal memory requirements, no overhead 
 * 1 = statistics on, but some have large granularity (0x200), very low overhead
 * 2 = statistics on, updated on every call to cs8900_service(), low overhead
 */
#define CS8900_STATS 2

/* pbuf transmit queue for buffering packets that need
   ARP destination address resolution. Indicate number
	 of queued packets here. Currently BETA support for
	 1 queued packet is available for testing purposes.
*/
//#define CS8900_TX_QUEUE 1
struct cs8900if
{  struct eth_addr *ethaddr;  u8_t needs_service;
  u8_t use_polling;
#if defined(CS8900_TX_QUEUE) && (CS8900_TX_QUEUE > 0)
  struct pbuf *tx_queue;
#endif
#if (CS8900_STATS > 0)
  u32_t interrupts; // number of interrupt requests of cs8900
  u32_t missed; // #packets on medium that could not enter cs8900a chip due to buffer shortage
  u32_t dropped; // #packets dropped after they have been received in chip buffer
  u32_t collisions; // #collisions on medium when transmitting packets 
  u32_t sentpackets; // #number of sent packets
  u32_t sentbytes; // #number of sent bytes
#endif

  /* Add whatever per-interface state that is needed here. */};void cs8900if_init(struct netif *);void cs8900if_service(struct netif *);
void cs8900_send_debug(unsigned char *p, unsigned int len);#endif /* __NETIF_CS8900IF_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -