stm32调试信息库

stm32调试信息库

在开发stm32程序的时候经常需要打印调试信息,该库主要用于方便的显示调试信息,在开发阶段可通过定义USER_MAIN_DEBUG来显示调试信息

运行阶段时只需取消宏定义即可

/*
 * @Descripttion: 该库主要用于方便的显示调试信息,在开发阶段可通过定义USER_MAIN_DEBUG来显示调试信息 
 * @version: 
 * @Author: GongHaoJing
 * @Date: 2021-10-21 22:37:47
 * @LastEditors: GongHaoJing
 * @LastEditTime: 2021-10-22 20:31:21
 * @WWW:: www.gonghaojing.top
 */
/*
 *                   ___====-_  _-====___
 *             _--^^^#####//      \\#####^^^--_
 *          _-^##########// (    ) \\##########^-_
 *         -############//  |\^^/|  \\############-
 *       _/############//   (@::@)   \############\_
 *      /#############((     \\//     ))#############\
 *     -###############\\    (oo)    //###############-
 *    -#################\\  / VV \  //#################-
 *   -###################\\/      \//###################-
 *  _#/|##########/\######(   /\   )######/\##########|\#_
 *  |/ |#/\#/\#/\/  \#/\##\  |  |  /##/\#/  \/\#/\#/\#| \|
 *  `  |/  V  V  `   V  \#\| |  | |/#/  V   '  V  V  \|  '
 *     `   `  `      `   / | |  | | \   '      '  '   '
 *                      (  | |  | |  )
 *                     __\ | |  | | /__
 *                    (vvv(VVV)(VVV)vvv)
 * 
 *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * 
 *                神兽保佑            永无BUG
 */
/*
 *  _              
 *| |   ___  __ _ 
 *| |__/ _ \/ _` |
 *|____\___/\__, |
 *          |___/ 
 * 
 */
#ifndef __LOG_H
#define __LOG_H	 

/**
 * @brief 该库主要用于方便的显示调试信息,在开发阶段可通过定义USER_MAIN_DEBUG来显示调试信息 
 * 
 */
#define USER_MAIN_DEBUG

#ifdef USER_MAIN_DEBUG

#define user_main_printf(format, ...) printf(format "\r\n", ##__VA_ARGS__)
#define user_main_info(format, ...) printf("[main]info:"format "\r\n", ##__VA_ARGS__)
#define user_main_debug(format, ...) printf("[main]debug:"format "\r\n", ##__VA_ARGS__)
#define user_main_error(format, ...) printf("[main]error:"format "\r\n", ##__VA_ARGS__)

#else
#define user_main_printf(format, ...) 
#define user_main_info(format, ...) 
#define user_main_debug(format, ...) 
#define user_main_error(format, ...) 

#endif

#endif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值