debug.c

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 #define _TRACE_ (DISABLE)
00015 //_____  I N C L U D E S ___________________________________________________
00016 #include "config.h"
00017 #include "debug.h"
00018 
00019 
00020 //_____ M A C R O S ________________________________________________________
00021 
00022 
00023 //_____ D E F I N I T I O N S ______________________________________________
00024 // Board Config
00025 
00026 
00027 //_____ D E C L A R A T I O N S ____________________________________________
00028 
00029 
00030 
00031 #if (_TRACE_==ENABLE)
00032 U8 _MEM_TYPE_SLOW_ g_trace_en=TRUE;
00033 
00034 
00035 
00040 void trace_u32( U32 val )
00041 {
00042    if( FALSE==g_trace_en ) return;
00043    printf("%lu",val);
00044 }
00045 
00050 void trace_u16( U16 val )
00051 {
00052    if( FALSE==g_trace_en ) return;
00053    printf("%u",val);
00054 }
00055 
00060 void trace_u8( U8 val )
00061 {
00062    if( FALSE==g_trace_en ) return;
00063    printf("%u",val);
00064 }
00065 
00070 void trace_hex( U8 val )
00071 {
00072    if( FALSE==g_trace_en ) return;
00073    printf("0x%02X",val);
00074 }
00075 #endif
00076 
00077 #if (_TRACE_==ENABLE)
00082 void trace( const U8* str )
00083 {
00084    if( FALSE==g_trace_en ) return;
00085    printf((const char*)str);
00086 }
00087 
00088 
00089 void trace_hex16(U16 val)
00090 {
00091    printf("0x%04X",val);
00092 }
00093 
00094 void trace_hex32(U32 val)
00095 {
00096    printf("0x%08lX",val);
00097 }
00098 
00099 void trace_nl()
00100 {
00101    trace("\n\r");
00102 }
00103 
00104 #endif
00105 

Generated on Fri Oct 31 14:31:23 2008 for ATMEL by  doxygen 1.5.3