2021-08-14 18:28:50 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) Wouter Symons
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup sys_auto_init_lwip_netif
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Auto initialization for stm32_eth network interfaces
|
|
|
|
*
|
|
|
|
* @author Wouter Symons <wsymons@nalys-group.com>
|
|
|
|
* @author Erik Ekman <eekman@google.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "stm32_eth.h"
|
|
|
|
|
|
|
|
#include "lwip_init_devs.h"
|
|
|
|
|
|
|
|
#define ENABLE_DEBUG 0
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
static netdev_t stm32_eth;
|
|
|
|
extern void stm32_eth_netdev_setup(netdev_t *netdev);
|
|
|
|
|
2021-10-08 18:59:32 +02:00
|
|
|
static lwip_netif_t netif;
|
2021-08-14 18:28:50 +02:00
|
|
|
|
2021-08-20 14:48:41 +02:00
|
|
|
static void auto_init_stm32_eth(void)
|
2021-08-14 18:28:50 +02:00
|
|
|
{
|
|
|
|
stm32_eth_netdev_setup(&stm32_eth);
|
|
|
|
if (lwip_add_ethernet(&netif, &stm32_eth) == NULL) {
|
|
|
|
DEBUG("Could not add stm32_eth device\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2021-08-20 14:48:41 +02:00
|
|
|
|
|
|
|
LWIP_INIT_ETH_NETIF(auto_init_stm32_eth);
|
2021-08-14 18:28:50 +02:00
|
|
|
/** @} */
|