| 1364 | } |
| 1365 | |
| 1366 | static rt_err_t eth_dev_init(rt_device_t device) |
| 1367 | { |
| 1368 | net_device_t net_dev = (net_device_t)device; |
| 1369 | struct netif *psNetif = (net_dev->parent.netif); |
| 1370 | |
| 1371 | LWIP_ASSERT("psNetif != NULL", (psNetif != NULL)); |
| 1372 | |
| 1373 | #if LWIP_NETIF_HOSTNAME |
| 1374 | /* Initialize interface hostname */ |
| 1375 | psNetif->hostname = "t4mc"; |
| 1376 | #endif /* LWIP_NETIF_HOSTNAME */ |
| 1377 | |
| 1378 | /* |
| 1379 | * Initialize the snmp variables and counters inside the struct netif. |
| 1380 | * The last argument should be replaced with your link speed, in units |
| 1381 | * of bits per second. |
| 1382 | */ |
| 1383 | //NETIF_INIT_SNMP(psNetif, snmp_ifType_ethernet_csmacd, 1000000); |
| 1384 | |
| 1385 | net_dev->dma_if = &g_StellarisIFData; |
| 1386 | |
| 1387 | /* Remember our MAC address. */ |
| 1388 | g_StellarisIFData.ethaddr = (struct eth_addr *)&(psNetif->hwaddr[0]); |
| 1389 | |
| 1390 | /* Initialize the hardware */ |
| 1391 | tivaif_hwinit(psNetif); |
| 1392 | return RT_EOK; |
| 1393 | } |
| 1394 | |
| 1395 | /* control the interface */ |
| 1396 | static rt_err_t eth_dev_control(rt_device_t dev, int cmd, void *args) |
nothing calls this directly
no test coverage detected