debug.c File Reference

#include "config.h"
#include "debug.h"

Include dependency graph for debug.c:

Go to the source code of this file.

Defines

#define _TRACE_   (DISABLE)

Functions

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_u16 (U16 val)
 Fonction used to display a 16-bit value in the decimal form on OCD/Serial Debug Interface.
void trace_u8 (U8 val)
 Fonction used to display a byte value in the decimal form on OCD/Serial Debug Interface.
void trace_hex (U8 val)
 Fonction used to display a byte value in the hex form on OCD/Serial Debug Interface.
void trace (const U8 *str)
 Fonction used for send a texte on OCD/Serial Debug Interface.
void trace_hex16 (U16 val)
void trace_hex32 (U32 val)
void trace_nl ()

Variables

U8 _MEM_TYPE_SLOW_ g_trace_en = TRUE


Detailed Description

This file holds definitions to help software designers in debugging their applications.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file debug.c.


Define Documentation

#define _TRACE_   (DISABLE)

Definition at line 46 of file debug.c.


Function Documentation

void trace_u32 ( U32  val  ) 

Fonction used to display a byte value in the decimal form (16 bits) on OCD/Serial Debug Interface.

Parameters:
val,: value of byte

Definition at line 72 of file debug.c.

Referenced by nf_scan().

00073 {
00074    if( FALSE==g_trace_en ) return;
00075    printf("%lu",val);
00076 }

Here is the caller graph for this function:

void trace_u16 ( U16  val  ) 

Fonction used to display a 16-bit value in the decimal form on OCD/Serial Debug Interface.

Parameters:
val,: value of byte

Definition at line 82 of file debug.c.

Referenced by nf_check_fbb().

00083 {
00084    if( FALSE==g_trace_en ) return;
00085    printf("%u",val);
00086 }

Here is the caller graph for this function:

void trace_u8 ( U8  val  ) 

Fonction used to display a byte value in the decimal form on OCD/Serial Debug Interface.

Parameters:
val,: value of byte

Definition at line 92 of file debug.c.

Referenced by nf_swap(), and nf_translate().

00093 {
00094    if( FALSE==g_trace_en ) return;
00095    printf("%u",val);
00096 }

Here is the caller graph for this function:

void trace_hex ( U8  val  ) 

Fonction used to display a byte value in the hex form on OCD/Serial Debug Interface.

Parameters:
val,: value of byte

Definition at line 102 of file debug.c.

Referenced by nf_check_fbb(), nf_rebuild(), nf_scan(), and nf_write_lut().

00103 {
00104    if( FALSE==g_trace_en ) return;
00105    printf("0x%02X",val);
00106 }

Here is the caller graph for this function:

void trace ( const U8 str  ) 

Fonction used for send a texte on OCD/Serial Debug Interface.

Parameters:
str,: texte to send (max. size = 256)

Definition at line 114 of file debug.c.

Referenced by main(), nf_cache_fbb_flush(), nf_cache_fbb_refill(), nf_cache_lut_flush(), nf_cache_lut_refill(), nf_check_fbb(), nf_copy_tail(), nf_dfc_write_stop(), nf_erase_old_blocks(), nf_read_10(), nf_rebuild(), nf_scan(), nf_swap(), nf_translate(), nf_write_10(), nf_write_lut(), and trace_nl().

00115 {
00116    if( FALSE==g_trace_en ) return;
00117    printf((const char*)str);
00118 }

Here is the caller graph for this function:

void trace_hex16 ( U16  val  ) 

Definition at line 121 of file debug.c.

Referenced by nf_cache_fbb_flush(), nf_cache_fbb_refill(), nf_cache_lut_flush(), nf_cache_lut_refill(), nf_check_fbb(), nf_erase_old_blocks(), nf_read_10(), nf_rebuild(), nf_scan(), nf_write_10(), and nf_write_lut().

00122 {
00123    printf("0x%04X",val);
00124 }

Here is the caller graph for this function:

void trace_hex32 ( U32  val  ) 

Definition at line 126 of file debug.c.

Referenced by nf_cache_lut_refill(), nf_copy_tail(), nf_dfc_write_stop(), nf_read_10(), nf_rebuild(), nf_swap(), nf_translate(), and nf_write_10().

00127 {
00128    printf("0x%08lX",val);
00129 }

Here is the caller graph for this function:

void trace_nl ( void   ) 

Definition at line 131 of file debug.c.

Referenced by main(), nf_cache_fbb_flush(), nf_cache_fbb_refill(), nf_cache_lut_flush(), nf_cache_lut_refill(), nf_check_fbb(), nf_copy_tail(), nf_dfc_write_stop(), nf_erase_old_blocks(), nf_read_10(), nf_rebuild(), nf_scan(), nf_swap(), nf_translate(), nf_write_10(), and nf_write_lut().

00132 {
00133    trace("\n\r");
00134 }

Here is the caller graph for this function:


Variable Documentation

U8 _MEM_TYPE_SLOW_ g_trace_en = TRUE

Definition at line 64 of file debug.c.

Referenced by trace(), trace_hex(), trace_u16(), trace_u32(), and trace_u8().


Generated on Mon Sep 14 13:14:19 2009 for ATMEL by  doxygen 1.5.3