/** \brief Initialize the Ethernet subsystem.
 *
 */
void init_ethernet(const u8_t macAddress[], const char *hostname)
{
	lwip_init();
	ethernet_hardware_init();

	ethernetif_set_mac_address(macAddress);
	netif_set_hostname(&gs_net_if, hostname);
}
Example #2
0
/** \brief Initialize the Ethernet subsystem.
 *
 */
void init_ethernet(const u8_t macAddress[], const char *hostname)
{
	lwip_init();
	ethernet_hardware_init();

	ethernetif_set_mac_address(macAddress);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waddress"
	/* netif_set_hostname() macro uses an always true conditional
	 * for encapsulation.  That, generates a compiler warning which
	 * is why that particular trick isn't always apt.
	 */
	netif_set_hostname(&gs_net_if, hostname);
#pragma GCC diagnostic pop
}