BLE demo for mbed Ported RunningElectronics's SBDBT firmware for BLE. It can communicate with iOS
Dependencies: FatFileSystem mbed
Fork of BTstack by
mydbg.h
00001 #ifndef _MYDBG_H_ 00002 #define _MYDBG_H_ 00003 00004 #ifdef __DEBUG 00005 #include "Utils.h" 00006 #define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); 00007 #define DBG2(...) do{fprintf(stderr,"[%d] ",__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); 00008 #define DBG_BYTES(A,B,C) do{printf("[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);printfBytes(A,B,C);}while(0); 00009 #define DBG_HEX(A,B) do{printf("[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);printHex(A,B);}while(0); 00010 #define DBG_LED4(A) led4.write(A) 00011 #define DBG_PRINTF(...) do{fprintf(stderr,__VA_ARGS__);} while(0); 00012 #else //__DEBUG 00013 #define DBG(...) while(0); 00014 #define DBG2(...) while(0); 00015 #define DBG_BYTES(A,B,C) while(0); 00016 #define DBG_HEX(A,B) while(0); 00017 #define DBG_LED4(A) while(0); 00018 #define DBG_PRINTF(...) while(0); 00019 #endif //__DEBUG 00020 00021 #ifdef __DEBUG3 00022 #define DBG3(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0); 00023 #else //__DEBUG3 00024 #define DBG3(...) while(0); 00025 #endif //__DEBUG3 00026 00027 #ifndef __NODEBUG 00028 #define DBG_ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; 00029 #else 00030 #define DBG_ASSERT(A) while(0); 00031 #endif 00032 00033 #define VERBOSE(...) do{printf(__VA_ARGS__);} while(0); 00034 00035 #endif //_MYDBG_H_
Generated on Thu Jul 14 2022 15:03:49 by 1.7.2