Add define to allow platform override of debug printf function
This commit is contained in:
parent
4b8c4990dc
commit
d987a8dd8c
|
@ -59,9 +59,12 @@ enum BMP_DEBUG {
|
||||||
* BMP PC-Hosted is the preferred way. Printing DEBUG_WARN
|
* BMP PC-Hosted is the preferred way. Printing DEBUG_WARN
|
||||||
* and DEBUG_INFO is kept for comptibiluty.
|
* and DEBUG_INFO is kept for comptibiluty.
|
||||||
*/
|
*/
|
||||||
|
# if !defined(PLATFORM_PRINTF)
|
||||||
|
# define PLATFORM_PRINTF printf
|
||||||
|
# endif
|
||||||
# if defined(ENABLE_DEBUG)
|
# if defined(ENABLE_DEBUG)
|
||||||
# define DEBUG_WARN printf
|
# define DEBUG_WARN PLATFORM_PRINTF
|
||||||
# define DEBUG_INFO printf
|
# define DEBUG_INFO PLATFORM_PRINTF
|
||||||
# else
|
# else
|
||||||
# define DEBUG_WARN(...) do {} while(0)
|
# define DEBUG_WARN(...) do {} while(0)
|
||||||
# define DEBUG_INFO(...) do {} while(0)
|
# define DEBUG_INFO(...) do {} while(0)
|
||||||
|
|
Loading…
Reference in New Issue