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.
#include "serint.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) |
| #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]
| 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]
| 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.
| 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.
| 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!
| 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!
| 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!
| 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!
| 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) |
1.4.7