ジャイロ追加前

Dependencies:   mbed FreeRTOS

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers debug.h Source File

debug.h

Go to the documentation of this file.
00001 /**
00002 * @file debug.h
00003 * @brief デバッグ用のプリントをするための定義
00004 * @author Shirota
00005 * @date 2018/10/01 ?
00006 */
00007 
00008 #ifndef __DEBUG_H__
00009 #define __DEBUG_H__
00010 /////////////////////////////////////////////////////////////////////
00011     
00012 /**
00013  * @def DEBUG_ENABLE
00014  * @brief デバッグ用のプリントをONにするオプション
00015  * @details デバッグイネーブル時はシリアルポートからプリントする
00016  *          デバッグ無効の場合は何もしない
00017  */
00018 #define DEBUG_ENABLE 
00019     
00020 #ifdef DEBUG_ENABLE
00021     #include <stdio.h>
00022     #include "uart.h"
00023     
00024     #define debug(...) sp.printf( __VA_ARGS__)
00025     #define debugw(...) spw.printf( __VA_ARGS__)
00026     #define trap(...)  sp.printf("[%s : Line = %d]\r\n",__FILE__ , __LINE__);sp.printf( __VA_ARGS__)
00027 #else
00028     #define debug(...) ((void)0)
00029     #define debugw(...) ((void)0)
00030     #define trap(...)  ((void)0)
00031 #endif
00032     
00033 /////////////////////////////////////////////////////////////////////
00034 #endif