Add PRINTA so direct calls to debug routines will always print
This commit is contained in:
parent
b7baf22a02
commit
a883c9bcbc
2 changed files with 16 additions and 12 deletions
|
@ -43,6 +43,7 @@
|
|||
#define UIP_DEBUG_H
|
||||
|
||||
#include "net/uip.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void uip_debug_ipaddr_print(const uip_ipaddr_t *addr);
|
||||
void uip_debug_lladdr_print(const uip_lladdr_t *addr);
|
||||
|
@ -52,10 +53,16 @@ void uip_debug_lladdr_print(const uip_lladdr_t *addr);
|
|||
#define DEBUG_ANNOTATE 2
|
||||
#define DEBUG_FULL DEBUG_ANNOTATE | DEBUG_PRINT
|
||||
|
||||
#if (DEBUG) & DEBUG_ANNOTATE
|
||||
#include <stdio.h>
|
||||
/* PRINTA will always print if the debug routines are called directly */
|
||||
#ifdef __AVR__
|
||||
#include <avr/pgmspace.h>
|
||||
#define PRINTA(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#else
|
||||
#define PRINTA(...) printf(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#if (DEBUG) & DEBUG_ANNOTATE
|
||||
#ifdef __AVR__
|
||||
#define ANNOTATE(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#else
|
||||
#define ANNOTATE(...) printf(__VA_ARGS__)
|
||||
|
@ -65,9 +72,7 @@ void uip_debug_lladdr_print(const uip_lladdr_t *addr);
|
|||
#endif /* (DEBUG) & DEBUG_ANNOTATE */
|
||||
|
||||
#if (DEBUG) & DEBUG_PRINT
|
||||
#include <stdio.h>
|
||||
#ifdef __AVR__
|
||||
#include <avr/pgmspace.h>
|
||||
#define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||
#else
|
||||
#define PRINTF(...) printf(__VA_ARGS__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue