Skip to content

Commit

Permalink
Merge pull request ARMmbed#36 from seankinghan/master
Browse files Browse the repository at this point in the history
fix bad macro redefinitions
  • Loading branch information
LiyouZhou authored Oct 5, 2017
2 parents 2cc3ad9 + 0228d5a commit 92e6f37
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/bootloader_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,26 @@ void printProgress(uint32_t progress, uint32_t total);
#include <inttypes.h>
#include <stdio.h>

#ifdef tr_debug
#undef tr_debug
#endif
#if 0
#define tr_debug(fmt, ...) printf("[DBG ] " fmt "\r\n", ##__VA_ARGS__)
#else
#define tr_debug(...)
#endif

#ifdef tr_info
#undef tr_info
#endif
#define tr_info(fmt, ...) printf("[BOOT] " fmt "\r\n", ##__VA_ARGS__)
#ifdef tr_warning
#undef tr_warning
#endif
#define tr_warning(fmt, ...) printf("[WARN] " fmt "\r\n", ##__VA_ARGS__)
#ifdef tr_error
#undef tr_error
#endif
#define tr_error(fmt, ...) printf("[ERR ] " fmt "\r\n", ##__VA_ARGS__)
#define tr_trace(fmt, ...) printf(fmt, ##__VA_ARGS__)
#define tr_flush(x) fflush(stdout)
Expand Down

0 comments on commit 92e6f37

Please sign in to comment.