debug.h File Reference
Code Debugging.
More...
#include "busser1.h"
Detailed Description
Code Debugging.
- Author:
- Modtronix Engineering
- Dependencies:
-
- Compiler:
- MPLAB C18 v2.10 or higher
HITECH PICC-18 V8.35PL3 or higher
Debug implementation. This file used to define the following debug function:
- dbPutByte()
- dbPutRomString()
- dbPutRomString()
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 |
( |
a |
|
) |
serPutByte(a) |
Writes the given byte out to the serial port as is.
- Parameters:
-
| a | Byte to write to the serial port. |
#define debugPutByteHex |
( |
a |
|
) |
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 |
( |
a |
|
) |
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 |
( |
a |
|
) |
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 |
( |
a |
|
) |
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 |
( |
a |
|
) |
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. |