80d3768a2de2810020e378d20dd3effdf3623556
Stefan Schuermans header fix

Stefan Schuermans authored 12 years ago

1) /* flaneth - flash and ethernet
2)    Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info>
3)    Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html
4)    a BlinkenArea project - http://www.blinkenarea.org/ */
Stefan Schuermans initial commit after making...

Stefan Schuermans authored 12 years ago

5) 
6) #ifndef INC_debug
7) #define INC_debug
8) 
9) #include <stdio.h>
10) #include <avr/pgmspace.h>
11) 
12) // debug configuration (what to debug)
13) #define DEBUG_INIT 1
14) #define DEBUG_EEPROM 1
15) #define DEBUG_CF 1
16) #define DEBUG_RTL8019 1
17) #define DEBUG_ETHER 1
18) #define DEBUG_ARP 1
19) #define DEBUG_IP 1
20) #define DEBUG_ICMP 1
21) #define DEBUG_UDP 1
22) #define DEBUG_DHCP 1
23) #define DEBUG_TCP 1
24) #define DEBUG_HTTP 1
25) 
26) // debug version of printf
27) #ifdef DEBUG
Stefan Schuermans added dosfs code to read FA...

Stefan Schuermans authored 12 years ago

28) #define debug_printf_nolf( fmt, arg... ) \
29)   do { \
30)     static const PROGMEM char fmt_pgm[] = fmt; \
Stefan Schuermans initial commit after making...

Stefan Schuermans authored 12 years ago

31)     char fmt_buf[sizeof( fmt_pgm )]; \
32)     for( int i = 0; i < sizeof( fmt_pgm ); i++ ) \
33)       fmt_buf[i] = (char)pgm_read_byte_near( (uint16_t)fmt_pgm + i ); \
34)     printf( fmt_buf, ##arg ); \
Stefan Schuermans added dosfs code to read FA...

Stefan Schuermans authored 12 years ago

35)   } while (0)
36) #define debug_printf( fmt, arg... ) debug_printf_nolf( fmt"\r\n", ##arg )
Stefan Schuermans initial commit after making...

Stefan Schuermans authored 12 years ago

37) #else
Stefan Schuermans added dosfs code to read FA...

Stefan Schuermans authored 12 years ago

38) #define debug_printf_nolf( fmt, arg... ) { }