#include <stdio.h>
Go to the source code of this file.
Defines | |
| #define | _TRACE_ (DISABLE) |
| This is Compilation switches definition. | |
| #define | _ASSERT_ (DISABLE) |
| #define | Assert(expr) |
| This macro is used to test fatal errors which may be caused by software or hardware bugs. | |
Functions | |
| void | trace (const U8 *str) |
| Fonction used for send a texte on OCD/Serial Debug Interface. | |
| void | trace_nl (void) |
| void | trace_hex (U8 val) |
| Fonction used to display a byte value in the hex form on OCD/Serial Debug Interface. | |
| void | trace_hex16 (U16 val) |
| void | trace_hex32 (U32 val) |
| void | trace_u8 (U8 val) |
| Fonction used to display a byte value in the decimal form on OCD/Serial Debug Interface. | |
| void | trace_u16 (U16 val) |
| Fonction used to display a 16-bit value in the decimal form on OCD/Serial Debug Interface. | |
| void | trace_u32 (U32 val) |
| Fonction used to display a byte value in the decimal form (16 bits) on OCD/Serial Debug Interface. | |
| void | trace_ptwo (U8 hex) |
Variables | |
| U8 _MEM_TYPE_SLOW_ | g_trace_en |
Definition in file debug.h.
| #define _TRACE_ (DISABLE) |
| #define Assert | ( | expr | ) |
Value:
{ \
if( !(expr) ) \
{ \
trace("\n\r"); \
trace(__FILE__); \
trace(":"); \
trace_u16(__LINE__); \
while(1) { \
} \
} \
}
The macro tests if the expression is TRUE. If it is not, a fatal error is detected and the application hangs.
| expr | expression which is supposed to be TRUE. |
Definition at line 73 of file debug.h.
Referenced by nf_cache_fbb_flush(), nf_cache_fbb_refill(), nf_cache_lut_flush(), nf_cache_lut_refill(), nf_check_fbb(), nf_check_lut(), nf_fetch_free_block(), nf_rebuild(), nf_refine_index(), nf_swap(), and nf_write_lut().
| void trace | ( | const U8 * | str | ) |
Fonction used for send a texte on OCD/Serial Debug Interface.
| str,: | texte to send (max. size = 256) |
Definition at line 82 of file debug.c.
References FALSE, and g_trace_en.
00083 { 00084 if( FALSE==g_trace_en ) return; 00085 printf((const char*)str); 00086 }
| void trace_nl | ( | void | ) |
| void trace_hex | ( | U8 | val | ) |
Fonction used to display a byte value in the hex form on OCD/Serial Debug Interface.
| val,: | value of byte |
Definition at line 70 of file debug.c.
References FALSE, and g_trace_en.
00071 { 00072 if( FALSE==g_trace_en ) return; 00073 printf("0x%02X",val); 00074 }
| void trace_hex16 | ( | U16 | val | ) |
| void trace_hex32 | ( | U32 | val | ) |
| void trace_u8 | ( | U8 | val | ) |
Fonction used to display a byte value in the decimal form on OCD/Serial Debug Interface.
| val,: | value of byte |
Definition at line 60 of file debug.c.
References FALSE, and g_trace_en.
00061 { 00062 if( FALSE==g_trace_en ) return; 00063 printf("%u",val); 00064 }
| void trace_u16 | ( | U16 | val | ) |
Fonction used to display a 16-bit value in the decimal form on OCD/Serial Debug Interface.
| val,: | value of byte |
Definition at line 50 of file debug.c.
References FALSE, and g_trace_en.
00051 { 00052 if( FALSE==g_trace_en ) return; 00053 printf("%u",val); 00054 }
| void trace_u32 | ( | U32 | val | ) |
Fonction used to display a byte value in the decimal form (16 bits) on OCD/Serial Debug Interface.
| val,: | value of byte |
Definition at line 40 of file debug.c.
References FALSE, and g_trace_en.
00041 { 00042 if( FALSE==g_trace_en ) return; 00043 printf("%lu",val); 00044 }
| void trace_ptwo | ( | U8 | hex | ) |
| U8 _MEM_TYPE_SLOW_ g_trace_en |
1.5.3