コード例 #1
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);
	netif_set_hostname(&gs_net_if, hostname);
}
コード例 #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
}
コード例 #3
0
ファイル: ethernet_sam.cpp プロジェクト: dc42/RepRapFirmware
/** \brief Configure the Ethernet subsystem. Should be called after init_ethernet()
 *
 */
void ethernet_configure_interface(const u8_t macAddress[], const char *hostname)
{
	ethernetif_set_mac_address(macAddress);
	netif_set_hostname(&gs_net_if, hostname);
}