mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-16 07:28:57 +00:00
Use AVR program flash for uip-debug.h printfs.
This commit is contained in:
parent
8fc8dfe656
commit
105f581d86
@ -54,14 +54,24 @@ void uip_debug_lladdr_print(const uip_lladdr_t *addr);
|
|||||||
|
|
||||||
#if (DEBUG) & DEBUG_ANNOTATE
|
#if (DEBUG) & DEBUG_ANNOTATE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#define ANNOTATE(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||||
|
#else
|
||||||
#define ANNOTATE(...) printf(__VA_ARGS__)
|
#define ANNOTATE(...) printf(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define ANNOTATE(...)
|
#define ANNOTATE(...)
|
||||||
#endif /* (DEBUG) & DEBUG_ANNOTATE */
|
#endif /* (DEBUG) & DEBUG_ANNOTATE */
|
||||||
|
|
||||||
#if (DEBUG) & DEBUG_PRINT
|
#if (DEBUG) & DEBUG_PRINT
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
#define PRINTF(FORMAT,args...) printf_P(PSTR(FORMAT),##args)
|
||||||
|
#else
|
||||||
#define PRINTF(...) printf(__VA_ARGS__)
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
#define PRINT6ADDR(addr) uip_debug_ipaddr_print(addr)
|
#define PRINT6ADDR(addr) uip_debug_ipaddr_print(addr)
|
||||||
#define PRINTLLADDR(lladdr) uip_debug_lladdr_print(lladdr)
|
#define PRINTLLADDR(lladdr) uip_debug_lladdr_print(lladdr)
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user