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时,##起到把前面多余的“,”去掉的作用。

相关文章:

  • 2022-12-23
  • 2021-06-25
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-08
  • 2021-06-01
  • 2021-08-08
相关资源
相似解决方案