22 #ifndef USB_USBUS_CDC_ECM_H 23 #define USB_USBUS_CDC_ECM_H 46 #ifndef USBUS_CDC_ECM_CONFIG_SPEED 47 #define USBUS_CDC_ECM_CONFIG_SPEED 1000000 53 #ifndef USBUS_CDC_ECM_CONFIG_SPEED_DOWNSTREAM 54 #define USBUS_CDC_ECM_CONFIG_SPEED_DOWNSTREAM USBUS_CDC_ECM_CONFIG_SPEED 60 #ifndef USBUS_CDC_ECM_CONFIG_SPEED_UPSTREAM 61 #define USBUS_CDC_ECM_CONFIG_SPEED_UPSTREAM USBUS_CDC_ECM_CONFIG_SPEED 71 #define USBUS_CDCECM_EP_CTRL_SIZE 16 78 #define USBUS_CDCECM_EP_DATA_SIZE 64
usbus_endpoint_t * ep_out
Data endpoint out.
event_t rx_flush
Receive flush event.
netdev_t netdev
Netdev context struct.
usbus_cdcecm_notif_t notif
Startup message notification tracker.
usbus_t * usbus
Ptr to the USBUS context.
Definitions low-level network driver interface.
#define ETHERNET_ADDR_LEN
Length of an Ethernet address.
Ethernet header definitions.
Definitions for USB protocol messages.
Definitions for Ethernet.
usbus_endpoint_t * ep_ctrl
Control endpoint.
void usbus_cdcecm_init(usbus_t *usbus, usbus_cdcecm_device_t *handler)
CDC ECM initialization function.
char mac_host[13]
host side's MAC address as string
usbus_string_t mac_str
String context for the host side mac address.
#define ETHERNET_FRAME_LEN
maximum number of bytes in an ethernet frame (without FCS)
USBUS descriptor generator.
usbus_handler_t handler_ctrl
Control interface handler.
usbus_descr_gen_t ecm_descr
ECM descriptor generator.
Structure to hold driver state.
uint8_t in_buf[ETHERNET_FRAME_LEN]
Buffer for the received frames.
uint8_t mac_netdev[ETHERNET_ADDR_LEN]
this device's MAC address
Mutex for thread synchronization.
usbus_cdcecm_notif_t
notification state, used to track which information must be send to the host
mutex_t out_lock
mutex used for locking netif/USBUS send
event_t tx_xmit
Transmit ready event.
unsigned active_iface
Current active data interface.
usbus_interface_alt_t iface_data_alt
Data alternative (active) interface.
size_t tx_len
Length of the current tx frame.
struct usbus_cdcecm_device usbus_cdcecm_device_t
USBUS CDC ECM device interface context.
USBUS control endpoint module.
size_t len
Length of the current rx frame.
stdlib.h wrapper for MSP430
USBUS CDC ECM device interface context.
usbus_interface_t iface_ctrl
Control interface.
USBUS interface alternative setting.
usbus_interface_t iface_data
Data interface.
usbus_endpoint_t * ep_in
Data endpoint in.