debug.h File Reference

Code Debugging. More...

#include "busser1.h"

Defines

#define debugMsgRomStr(debugCode, msgCode, msgString)   serPutDebugMsgRomStr(debugCode, msgCode, msgString)
#define debugPut2Bytes(debugCode, msgCode)   serPut2Bytes(debugCode, msgCode)
#define debugPut2BytesAndStr(debugCode, msgCode)   serPut2Bytes(debugCode, msgCode)
#define debugPutByte(a)   serPutByte(a)
#define debugPutByteHex(a)   serPutByteHex(a)
#define debugPutRomString(a)   serPutRomStringAndNull(a)
#define debugPutRomStringXNull(a)   serPutRomString(a)
#define debugPutString(a)   serPutStringAndNull((BYTE* )a)
#define debugPutStringXNull(a)   serPutString((BYTE *)a)
#define LOG_DEBUG   (50)
#define LOG_ERROR   (20)
#define LOG_FATAL   (10)
#define LOG_INFO   (40)
#define LOG_OFF   (0)
#define LOG_WARN   (30)


Detailed Description

Code Debugging.

Author:
Modtronix Engineering
Dependencies:
Compiler:
MPLAB C18 v2.10 or higher
HITECH PICC-18 V8.35PL3 or higher

Description

Debug implementation. This file used to define the following debug function:

The default implementation is to define them to use the serial port. This can however be changed and a different implementation is required. For example, it can be changed so that the debug information is sent via a UDP socket in stead of the serial port.

For details on debugging, see Debugging module.


Define Documentation

#define debugMsgRomStr ( debugCode,
msgCode,
msgString   )     serPutDebugMsgRomStr(debugCode, msgCode, msgString)

Sent the given debug message to the "Modtronix Embedded Debugger". The following is sent: [debugCode][msgCode][msgString]

Parameters:
debugCode The Debug Message's "Debug Code". This will be the first byte sent.
msgCode The Debug Message's "Message Code". This will be the second byte sent.
msgString The Debug Message's "Message String", has to be a NULL terminated string. This will be sent after the msgCode.

#define debugPut2Bytes ( debugCode,
msgCode   )     serPut2Bytes(debugCode, msgCode)

Sent the given debug message to the "Modtronix Embedded Debugger". The following is sent: [debugCode][msgCode][msgString]

Parameters:
debugCode The Debug Message's "Debug Code". This will be the first byte sent.
msgCode The Debug Message's "Message Code". This will be the second byte sent.

#define debugPut2BytesAndStr ( debugCode,
msgCode   )     serPut2Bytes(debugCode, msgCode)

#define debugPutByte (  )     serPutByte(a)

Writes the given byte out to the serial port as is.

Parameters:
a Byte to write to the serial port.

#define debugPutByteHex (  )     serPutByteHex(a)

Writes the given byte out to the serial port in ascii hex format. For example, if decimal 11 is passed to this function, it will write "0B" will be written to the serial port.

Parameters:
a Byte to write to the serial port.

#define debugPutRomString (  )     serPutRomStringAndNull(a)

Writes the given null terminated string out to the serial port. The NULL is ALSO written!

Parameters:
a Null terminated string to write out to the serial port. The trailing NULL is ALSO written!

#define debugPutRomStringXNull (  )     serPutRomString(a)

Writes the given null terminated string out to the serial port. The NULL is excluded, and is NOT written!

Parameters:
a Null terminated string to write out to the serial port. The trailing NULL is NOT written!

#define debugPutString (  )     serPutStringAndNull((BYTE* )a)

Writes the given null terminated string out to the serial port. The NULL is ALSO written!

Parameters:
a Null terminated string to write out to the serial port. The trailing NULL is ALSO written.

#define debugPutStringXNull (  )     serPutString((BYTE *)a)

Writes the given null terminated string out to the serial port. The NULL is excluded, and is NOT written!

Parameters:
a Null terminated string to write out to the serial port. The trailing NULL is NOT written.

#define LOG_DEBUG   (50)

#define LOG_ERROR   (20)

#define LOG_FATAL   (10)

#define LOG_INFO   (40)

#define LOG_OFF   (0)

#define LOG_WARN   (30)


Generated on Wed Feb 3 12:45:34 2010 for SBC65EC Web Server by  doxygen 1.5.8