Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

log.h File Reference

Logging declarations. More...

#include <types.h>

Go to the source code of this file.

Defines

#define LOG_START   0x1800
#define LOG_TAG_JOKER   0xFE
#define LOG_TAG_EEWRITE_DST   0x01
#define LOG_TAG_EEWRITE_SRC   0x02
#define LOG_TAG_EEWRITE_LEN   0x03
#define LOG_TAG_EEREAD_DST   0x04
#define LOG_TAG_EEREAD_SRC   0x05
#define LOG_TAG_EEREAD_LEN   0x06
#define LOG_TAG_FSCREATE   0x07
#define LOG_TAG_RANDOM   0x08
#define log_init()
 Initialize global logging variables. More...

#define log_add(tag, data, len)
 Log data. More...


Variables

bool log_enable
 Enables/disables logging. More...


Detailed Description

Logging declarations.

This logging facility can be used to assist debugging. It appends TLV objects (Tag, Length, Value) to logging area starting at LOG_START+2. At LOG_START the address of the end of data is maintained. This is in native byte order. (Native of architecture or compiler.)

Tags can be used to specify what data has been logged. This is meant to assist testing, so be free to change the tags as needed.

Id:
log.h,v 1.5 2002/12/22 15:42:55 m Exp


Define Documentation

#define log_add tag,
data,
len   
 

Log data.

Tag, length and then the data itself is append to the log data. It can be called even, when CONF_WITH_LOGGING is not 1, because it is then neutralized with a define.

Parameters:
tag  Tag descriping the data.
data  Pointer to the data.
len  Length of the data in bytes.

 
#define log_init  
 

Initialize global logging variables.

This function must be called before using log_add. It can be called even, when CONF_WITH_LOGGING is not 1, because it is then neutralized with a define.

#define LOG_START   0x1800
 

#define LOG_TAG_EEREAD_DST   0x04
 

#define LOG_TAG_EEREAD_LEN   0x06
 

#define LOG_TAG_EEREAD_SRC   0x05
 

#define LOG_TAG_EEWRITE_DST   0x01
 

#define LOG_TAG_EEWRITE_LEN   0x03
 

#define LOG_TAG_EEWRITE_SRC   0x02
 

#define LOG_TAG_FSCREATE   0x07
 

#define LOG_TAG_JOKER   0xFE
 

#define LOG_TAG_RANDOM   0x08
 


Variable Documentation

bool log_enable
 

Enables/disables logging.

This must be set the TRUE, before any log_add has an effect. It can be also changed in between to switch off and on logging to reduce unwanted data in the logging area.


Copyright 2002 by Matthias Bruestle. This is licensed under the GNU General Public License.