#ifndef __DRV_ETH_H__
#define __DRV_ETH_H__

#include "stm32f4xx_hal.h"
#include "lwip/netif.h"
#include "lwip/err.h"

/* MAC Address */
#ifndef MAC_ADDR0
#define MAC_ADDR0   0x00
#endif
#ifndef MAC_ADDR1
#define MAC_ADDR1   0x80
#endif
#ifndef MAC_ADDR2
#define MAC_ADDR2   0xE1
#endif
#ifndef MAC_ADDR3
#define MAC_ADDR3   0x00
#endif
#ifndef MAC_ADDR4
#define MAC_ADDR4   0x00
#endif
#ifndef MAC_ADDR5
#define MAC_ADDR5   0x00
#endif

/* Definition of the Ethernet driver buffers size and count */
#ifndef ETH_RX_BUF_SIZE
#define ETH_RX_BUF_SIZE                1536   /* ETH Max packet size */
#endif
#ifndef ETH_TX_BUF_SIZE
#define ETH_TX_BUF_SIZE                1536   /* ETH Max packet size */
#endif
#ifndef ETH_RXBUFNB
#define ETH_RXBUFNB                    4
#endif
#ifndef ETH_TXBUFNB
#define ETH_TXBUFNB                    4
#endif

/* Exported functions */
err_t ethernetif_init(struct netif *netif);
void ethernetif_input(struct netif *netif);
void ethernet_link_check_state(struct netif *netif);

#endif /* __DRV_ETH_H__ */
