Tool/software: TI-RTOS
how should the function EMAC_open_v4 (file emac_drv_v4.c)? I assumed that she initialisere ports of the switch separately. But for some reason I saw this code :
emac_mcb.port_cb[port_num].rx_pkt_cb = p_config->rx_pkt_cb;
emac_mcb.port_cb[port_num].alloc_pkt_cb = p_config->alloc_pkt_cb;
emac_mcb.port_cb[port_num].free_pkt_cb = p_config->free_pkt_cb;
emac_mcb.port_cb[port_num+1U].rx_pkt_cb = p_config->rx_pkt_cb;
emac_mcb.port_cb[port_num+1U].alloc_pkt_cb = p_config->alloc_pkt_cb;
emac_mcb.port_cb[port_num+1U].free_pkt_cb = p_config->free_pkt_cb;
where port_num is the input parameter.
Next, the code configures the registers of both ports. But variables for some structures are configured only for one port.
If there is possible to talk with someone who has used this driver or have developed, then I'll show parts of the code which confused me.
thanks in advance