uboot中DEBUG定义

uboot的debug定义在include/common.h中

#ifdef DEBUG

#define debug(fmt, args...)  printf(fmt, ##args)

#define debugX(level, fmt, args...)  if(DEBUG>=level) printf(fmt, ##args)

#else

#define debug(fmt, args...)

#define debugX(level, fmt, args...)

#endif

注:args前加##的作用在于,当可变参数的个数为0时,##起到把前面多余的“,”去掉的作用。

posted @ 2015-09-05 17:37  yuxi_o  阅读(986)  评论(0编辑  收藏  举报