Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
debug.h
00001 #ifndef DEBUG_H 00002 #define DEBUG_H 00003 00004 #include "mbed.h" 00005 #include "common.h" 00006 00007 enum Verbosity 00008 { 00009 DBG = 0, 00010 MSG = 1, 00011 WRN = 2, 00012 ERR = 3 00013 }; 00014 00015 class debug 00016 { 00017 public: 00018 debug ( ) : minimum_level( DBG ), inf_pc( NULL ), inf_bt( NULL ) {} 00019 void init ( int _bdr ) ; 00020 void filter( Verbosity _min_lvl ) ; // select minimum output verbosity 00021 void out ( Verbosity _lvl, const char* _fmt, ... ) ; 00022 void tag ( char _tag ) ; 00023 void flip ( ) ; 00024 char find ( I2C * inf ) ; 00025 00026 void srt ( ) ; 00027 void stp ( const char* msg ) ; 00028 00029 private: 00030 Verbosity minimum_level; 00031 DigitalOut* led; 00032 DigitalOut* pin[3]; 00033 public: 00034 Timer* tmr; 00035 Serial* inf_pc; 00036 Serial* inf_bt; 00037 bool smp_pc; 00038 bool fft_pc; 00039 bool smp_bt; 00040 bool fft_bt; 00041 }; 00042 00043 #endif
Generated on Thu Jul 21 2022 21:11:50 by
1.7.2