diff --git a/include/lwipopts.h b/include/lwipopts.h index 4cbbf2e..d415ea9 100644 --- a/include/lwipopts.h +++ b/include/lwipopts.h @@ -1235,6 +1235,18 @@ #define LWIP_HAVE_SLIPIF 0 #endif +/* + ------------------------------------ + ---------- ENC28J60IF options ---------- + ------------------------------------ +*/ +/** + * LWIP_HAVE_ENC28J60IF==1: Support ENC28J60 ethernet interface and espenc.c + */ +#ifndef LWIP_HAVE_ENC28J60IF +#define LWIP_HAVE_ENC28J60IF 0 +#endif + /* ------------------------------------ ---------- Thread options ---------- diff --git a/lwip/netif/espenc.c b/lwip/netif/espenc.c index 96cb5d5..11928ab 100644 --- a/lwip/netif/espenc.c +++ b/lwip/netif/espenc.c @@ -5,7 +5,8 @@ #include "gpio.h" #include "mem.h" -#if 0 // DEBUG: disable all espenc - we dont need it for MeterLogger hardware +#if LWIP_HAVE_ENC28J60IF + struct netif enc_netif; typedef enum { @@ -452,4 +453,4 @@ struct netif* espenc_init(uint8_t *mac_addr, ip_addr_t *ip, ip_addr_t *mask, ip_ return new_netif; } -#endif +#endif /* LWIP_HAVE_ENC28J60IF */