Skip to content

Commit

Permalink
option LWIP_HAVE_ENC28J60IF in lwipopts.h to enable LWIP_HAVE_ENC28J60
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristoffer Ek committed May 1, 2020
1 parent a562cb5 commit 2195f94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions include/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------
Expand Down
5 changes: 3 additions & 2 deletions lwip/netif/espenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 */

0 comments on commit 2195f94

Please sign in to comment.