mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
rename STATS to LWIP_STATS and make it checked by #if not #ifdef.The rest of the _STATS defines should follow
This commit is contained in:
parent
441e9b8431
commit
0846206bc0
@ -39,15 +39,13 @@
|
||||
#include "lwip/mem.h"
|
||||
|
||||
|
||||
#ifdef STATS
|
||||
#if LWIP_STATS
|
||||
struct stats_ lwip_stats;
|
||||
#endif /* STATS */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
stats_init(void)
|
||||
{
|
||||
#ifdef STATS
|
||||
memset(&lwip_stats, 0, sizeof(struct stats_));
|
||||
#endif /* STATS */
|
||||
}
|
||||
#endif /* LWIP_STATS */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
@ -87,9 +87,6 @@ PACK_STRUCT_END
|
||||
# include "arch/epstruct.h"
|
||||
#endif
|
||||
|
||||
/* Declare here to avoid including netif.h creating a circular dependency */
|
||||
//struct netif;
|
||||
|
||||
/** start DHCP configuration */
|
||||
err_t dhcp_start(struct netif *netif);
|
||||
/** stop DHCP configuration */
|
||||
|
@ -297,9 +297,12 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#endif
|
||||
|
||||
/* ---------- Statistics options ---------- */
|
||||
#define STATS
|
||||
#ifndef LWIP_STATS
|
||||
#define LWIP_STATS 1
|
||||
#endif
|
||||
|
||||
#if LWIP_STATS
|
||||
|
||||
#ifdef STATS
|
||||
#define LINK_STATS
|
||||
#define IP_STATS
|
||||
#define ICMP_STATS
|
||||
@ -309,7 +312,8 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#define MEMP_STATS
|
||||
#define PBUF_STATS
|
||||
#define SYS_STATS
|
||||
#endif /* STATS */
|
||||
|
||||
#endif /* LWIP_STATS */
|
||||
|
||||
/* Debugging options all default to off */
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/memp.h"
|
||||
|
||||
#ifdef STATS
|
||||
#if LWIP_STATS
|
||||
|
||||
struct stats_proto {
|
||||
u16_t xmit; /* Transmitted packets. */
|
||||
@ -99,9 +99,11 @@ struct stats_ {
|
||||
|
||||
extern struct stats_ lwip_stats;
|
||||
|
||||
#endif /* STATS */
|
||||
|
||||
void stats_init(void);
|
||||
#else
|
||||
#define stats_init()
|
||||
#endif /* LWIP_STATS */
|
||||
#endif /* __LWIP_STATS_H__ */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user