提交 26a09567 编写于 作者: Huge_HW's avatar Huge_HW

change LOWPOWER_DEBUG to LWIP_DEBUGF

Signed-off-by: Huge_HW's avatarHuge_Dream <534463586@qq.com>
Change-Id: I86c89d28272120b9d28ac26aba4d8e4ecf626082
上级 b125a5fa
......@@ -419,7 +419,7 @@ dns_tmr_tick(void)
for (i = 0; i < DNS_TABLE_SIZE; i++) {
if ((dns_table[i].state == DNS_STATE_NEW) ||
(dns_table[i].state == DNS_STATE_ASKING)) {
LOWPOWER_DEBUG(("%s tmr tick: 1\n", "dns_tmr_tick"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: 1\n", "dns_tmr_tick"));
return 1;
}
if (dns_table[i].state == DNS_STATE_DONE) {
......@@ -427,7 +427,7 @@ dns_tmr_tick(void)
SET_TMR_TICK(tick, val);
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "dns_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "dns_tmr_tick", tick));
return tick;
}
#endif
......
......@@ -377,7 +377,7 @@ autoip_tmr_tick(void)
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "autoip_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "autoip_tmr_tick", tick));
return tick;
}
......
......@@ -204,14 +204,14 @@ etharp_tmr_tick(void)
#endif /* ETHARP_SUPPORT_STATIC_ENTRIES */
) {
if (arp_table[i].state != ETHARP_STATE_STABLE) {
LOWPOWER_DEBUG(("%s tmr tick: 1\n", "etharp_tmr_tick"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: 1\n", "etharp_tmr_tick"));
return 1;
}
time = (u32_t)ARP_MAXAGE - arp_table[i].ctime;
SET_TMR_TICK(tick, time);
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "etharp_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "etharp_tmr_tick", tick));
return tick;
}
#endif /* LWIP_LOWPOWER */
......
......@@ -689,7 +689,7 @@ igmp_tmr_tick(void)
group = group->next;
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "igmp_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "igmp_tmr_tick", tick));
return tick;
}
#endif
......
......@@ -228,7 +228,7 @@ ip_reass_tmr_tick(void)
SET_TMR_TICK(tick, val);
r = r->next;
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "ip_reass_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "ip_reass_tmr_tick", tick));
return tick;
}
#endif /* LWIP_LOWPOWER */
......
......@@ -842,7 +842,7 @@ dhcp6_tmr_tick()
SET_TMR_TICK(tick, dhcp6->request_timeout);
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "dhcp6_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "dhcp6_tmr_tick", tick));
return tick;
}
#endif /* LWIP_LOWPOWER */
......
......@@ -152,7 +152,7 @@ ip6_reass_tmr_tick(void)
SET_TMR_TICK(tick, val);
r = r->next;
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "ip6_reass_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "ip6_reass_tmr_tick", tick));
return tick;
}
#endif /* LWIP_LOWPOWER */
......
......@@ -553,7 +553,7 @@ mld6_tmr_tick(void)
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "mld6_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "mld6_tmr_tick", tick));
return tick;
}
#endif
......
......@@ -1247,7 +1247,7 @@ nd6_tmr_tick(void)
/* Step 2: update DAD state. */
addr_state = netif_ip6_addr_state(netif, i);
if (ip6_addr_istentative(addr_state)) {
LOWPOWER_DEBUG(("%s tmr tick: 1\n", "nd6_tmr_tick"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: 1\n", "nd6_tmr_tick"));
return 1;
}
}
......@@ -1262,7 +1262,7 @@ nd6_tmr_tick(void)
}
#endif /* LWIP_IPV6_SEND_ROUTER_SOLICIT */
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "nd6_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "nd6_tmr_tick", tick));
return tick;
}
#endif /* LWIP_LOWPOWER */
......
......@@ -174,7 +174,7 @@ sys_timeout_reg(
timeout = (struct timer_entry *)memp_malloc(MEMP_SYS_TIMEOUT);
if (timeout == NULL) {
LOWPOWER_DEBUG(("sys_timeout_reg: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("sys_timeout_reg: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty"));
return -1;
}
......@@ -210,7 +210,7 @@ timeout_handler(struct timer_entry *t, u32_t now)
{
#if LOWPOWER_TIMER_DEBUG
if (t->name != NULL) {
LOWPOWER_DEBUG(("%s timeout: now:%u\n", t->name, now));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s timeout: now:%u\n", t->name, now));
}
#endif
......@@ -233,7 +233,7 @@ get_timer_tick(struct timer_entry *t)
tick = t->next_tick();
} else {
tick = 1;
LOWPOWER_DEBUG(("next->tick is NULL\n"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("next->tick is NULL\n"));
}
tick *= t->clock_max;
return tick;
......@@ -274,7 +274,7 @@ get_sleep_time(u32_t now)
u32_t tick;
u32_t temp;
LOWPOWER_DEBUG(("\n*******get_sleep_time*****************\n"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("\n*******get_sleep_time*****************\n"));
for (t = g_timer_header, p = NULL; t != NULL; t = n) {
n = t->next;
......@@ -307,7 +307,7 @@ again:
p = t;
}
LOWPOWER_DEBUG(("msec = %u now = %u\n", msec, now));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("msec = %u now = %u\n", msec, now));
return msec;
}
......@@ -321,8 +321,8 @@ check_timeout(u32_t now)
u32_t ticks;
u32_t i;
LOWPOWER_DEBUG(("\n**********timeout**************\n"));
LOWPOWER_DEBUG(("now = %u\n", now));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("\n**********timeout**************\n"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("now = %u\n", now));
for (t = g_timer_header, p = NULL; t != NULL; t = n) {
n = t->next;
......@@ -420,7 +420,7 @@ sys_timeouts_init(void)
for (i = 0; i < LWIP_ARRAYSIZE(lowpower_timer_handler); i++) {
if (set_timer_interval(i, lowpower_timer_handler[i].interval) != 0) {
LOWPOWER_DEBUG(("ERROR:regist timer faild! i = %u\n", i));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("ERROR:regist timer faild! i = %u\n", i));
}
}
}
......
......@@ -375,7 +375,7 @@ tcp_slow_tmr_tick(void)
pcb = pcb->next;
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "tcp_slow_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "tcp_slow_tmr_tick", tick));
return tick;
}
......@@ -391,12 +391,12 @@ tcp_fast_tmr_tick(void)
(pcb->flags & TF_CLOSEPEND) ||
(pcb->refused_data != NULL)
) {
LOWPOWER_DEBUG(("%s tmr tick: 1\n", "tcp_fast_tmr_tick"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: 1\n", "tcp_fast_tmr_tick"));
return 1;
}
pcb = pcb->next;
}
LOWPOWER_DEBUG(("%s tmr tick: 0\n", "tcp_fast_tmr_tick"));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: 0\n", "tcp_fast_tmr_tick"));
return 0;
}
#endif /* LWIP_LOWPOWER */
......
......@@ -3539,14 +3539,11 @@
#if LWIP_LOWPOWER
#ifndef LOWPOWER_DBG
#define LOWPOWER_DBG 0
#endif
#if LOWPOWER_DBG
#define LOWPOWER_DEBUG(msg) printf msg
#else
#define LOWPOWER_DEBUG(msg)
/**
* LOWPOWER_DEBUG: Enable debugging in lowpower.c.
*/
#if !defined LOWPOWER_DEBUG || defined __DOXYGEN__
#define LOWPOWER_DEBUG LWIP_DBG_OFF
#endif
#ifndef MEMP_NUM_TCPIP_MSG_LOWPOWER
......
......@@ -138,7 +138,7 @@ lowpan6_tmr_tick()
lrh = lrh_temp;
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", "lowpan6_tmr_tick", tick));
LWIP_DEBUGF(LOWPOWER_DEBUG, ("%s tmr tick: %u\n", "lowpan6_tmr_tick", tick));
return tick;
}
#endif /* LWIP_LOWPOWER */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册