Skip to content

Commit

Permalink
Updated DBG macros as suggested by susisstrolch
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnels committed Dec 1, 2015
1 parent 25ef0e1 commit b8567ad
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmd/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "uart.h"

#ifdef CMD_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
2 changes: 1 addition & 1 deletion cmd/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#endif

#ifdef CMD_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
4 changes: 1 addition & 3 deletions esp-link/cgioptiboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
#define PGM_TIMEOUT 20000 // timeout when sync is achieved, in milliseconds
#define PGM_INTERVAL 200 // send sync at this interval in ms when in programming mode

#define OPTIBOOT_DBG
#undef DBG
#ifdef OPTIBOOT_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
2 changes: 1 addition & 1 deletion esp-link/cgiwifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Cgi/template routines for the /wifi url.
#include "mdns.h"

#ifdef CGIWIFI_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
2 changes: 1 addition & 1 deletion esp-link/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "mdns.h"

#ifdef MDNS_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
2 changes: 1 addition & 1 deletion httpd/httpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Esp8266 http server - core routines
#include "httpd.h"

#ifdef HTTPD_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
1 change: 1 addition & 0 deletions include/user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#undef SLIP_DBG
#define UART_DBG
#define MDNS_DBG
#define OPTIBOOT_DBG

// If defined, the default hostname for DHCP will include the chip ID to make it unique
#undef CHIP_IN_HOSTNAME
Expand Down
2 changes: 1 addition & 1 deletion mqtt/mqtt_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "mqtt_cmd.h"

#ifdef MQTTCMD_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down
2 changes: 1 addition & 1 deletion serial/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "cmd.h"

#ifdef SLIP_DBG
#define DBG(format, ...) os_printf(format, ## __VA_ARGS__)
#define DBG(format, ...) do { os_printf(format, ## __VA_ARGS__) } while(0)
#else
#define DBG(format, ...) do { } while(0)
#endif
Expand Down

0 comments on commit b8567ad

Please sign in to comment.