EVE 1.0
usbnet.h File Reference

Common USB network layer, used by virtually all supported network USB protocols. More...

#include <lib/dlist.h>
#include <net/uip.h>
#include <net/common/ep.h>
Include dependency graph for usbnet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usbnet_rx_buf_t
 
struct  usbnet_tx_buf_t
 
struct  usbnet_tx_tiny_buf_t
 
struct  net_buffers_t
 
struct  usbnet_stat_h
 

Macros

#define USBNET_ETH_FRAME_LEN   (UIP_BUFSIZE + 58 - UIP_LLH_LEN)
 
#define USBNET_RX_BUF_SIZE   USBNET_ETH_FRAME_LEN
 
#define USBNET_TX_BUF_SIZE   USBNET_ETH_FRAME_LEN
 
#define USBNET_TX_TINY_BUF_SIZE   (248)
 
#define USBNET_RX_POOL_SIZE   (1)
 
#define USBNET_TX_POOL_SIZE   (1)
 
#define USBNET_TX_TINY_POOL_SIZE   (2)
 
#define USBNET_MANAGED_TX_POOL_SIZE   (2)
 

Enumerations

Functions

void usbnet_init ()
 
void usbnet_start (struct process *module, uint8_t rx_backlog_len)
 
void usbnet_stop (struct process *module)
 
struct urb_tusbnet_alloc_urb (struct process *module, uint32_t size, struct dlist_t *backlog)
 
void usbnet_schedule_tx (struct urb_t *urb)
 
void usbnet_schedule_rx (struct urb_t *urb)
 
bool usbnet_quote (void)
 
static struct usbnet_tx_buf_tusbnet_tx_buf (struct urb_t *urb)
 
static struct usbnet_rx_buf_tusbnet_rx_buf (struct urb_t *urb)
 

Variables

struct process * device
 
uint8_t data [USBNET_RX_BUF_SIZE]
 
struct dlist_tbacklog
 
uint32_t seq
 
struct usbnet_stat_h usbnetStat
 

Detailed Description

Common USB network layer, used by virtually all supported network USB protocols.

Author
DT, Jetro AS

Definition in file usbnet.h.

Variable Documentation

struct process * device

Pointer to the network device

Definition at line 139 of file usbnet.h.

uint8_t data

The actual data buffer

Definition at line 140 of file usbnet.h.

Referenced by crc16_data(), process_init(), process_post(), process_start(), simple_udp_deregister(), tcpip_output(), and uip_add32().

struct dlist_t * backlog

The backlog the buffer belongs to

The backlog always points to usbnetTxTinyEp

Definition at line 139 of file usbnet.h.

Referenced by htons(), and uip_init().

uint32_t seq

Internally used for indexing in UIP

Not used for usbnet_tx_tiny_buf_t

Definition at line 140 of file usbnet.h.