void designware_emac_v3_init(CTL_NET_INTERFACE_t *self, void *emac, void *mem, int tx_descriptor_count, int rx_descriptor_count, int clock);
designware_emac_v3_init initializes the network interface self but does not start it. The DesignWare 10/100 EMAC register interface is specified in emac and the memory required to hold the transmit and receive descriptors is specified in mem.
The number of transmit and receive descriptors are passed in tx_descriptor_count and rx_descriptor_count. At least two transmit descriptors are required, and transmit performance of the TCP/IP library will scale with the number of descriptors allocated. At least one receive descriptor is required, and receive performance of the TCP/IP library will scale with the number of descriptors allocated.
The clock provided to the module is passed in clock, in Hertz. The driver automatically configures the MAC to divide the module clock in order to clock the management interface at a maximum of 2.5 MHz.
mem must be accessible by the DMA engine of the Ethernet MAC. Please ensure that you pass an appropriate address for the descriptors by consulting the user manual of your device.