EmberZNet debugging utilities.
EmberZNet debugging utilities.
See
ember-debug.h
for source code.
◆
BASIC_DEBUG
◆
emberDebugInit
#define emberDebugInit
|
(
|
|
port
|
)
|
do {} while (false)
|
This function is obsolete and no longer required to initialize the debug system.
-
Parameters
-
port
|
Ignored because the port used for debug communication is automatically determined for each platform.
|
◆
FULL_DEBUG
◆
NO_DEBUG
◆
emberDebugAssert()
void emberDebugAssert
|
(
|
const char *
|
filename,
|
|
|
int
|
linenumber
|
|
)
|
|
|
Prints the filename and line number to the debug serial port.
-
Parameters
-
filename
|
The name of the file where the assert occurred.
|
linenumber
|
The line number in the file where the assert occurred.
|
◆
emberDebugBinaryPrintf()
void emberDebugBinaryPrintf
|
(
|
const char *
|
formatString,
|
|
|
|
...
|
|
)
|
|
|
Prints binary data to the debug channel.
This function does not use the normal printf format conventions. To print text debug messages, use
emberDebugPrintf()
. The format string must contain only these conversion specification characters:
-
B - uint8_t value.
-
W - uint16_t value, printed least significant byte first.
-
D - uint32_t value, printed least significant byte first.
-
F - pointer to null terminated string in Flash (const char *).
-
xxxp - pointer to RAM, length is xxx (max 255).
-
lp - pointer to RAM, length is uint8_t argument.
-
xxxf - pointer to Flash (const char *), length is xxx (max 255).
-
lf - pointer to Flash (const char *), length is uint8_t argument.
-
b - EmberMessageBuffer.
Examples:
-
Parameters
-
formatString
|
A string of conversion specification characters describing the arguments to be printed.
|
...
|
The arguments to be printed.
|
◆
emberDebugError()
Prints an
EmberStatus
return code to the serial port.
-
Parameters
-
code
|
The
EmberStatus
code to print.
|
◆
emberDebugMemoryDump()
void emberDebugMemoryDump
|
(
|
uint8_t *
|
start,
|
|
|
uint8_t *
|
end
|
|
)
|
|
|
Prints the contents of RAM to the debug serial port.
-
Parameters
-
start
|
The start address of the block of RAM to dump.
|
end
|
The end address of the block of RAM to dump (address of the last byte).
|
◆
emberDebugPrintf()
void emberDebugPrintf
|
(
|
const char *
|
formatString,
|
|
|
|
...
|
|
)
|
|
|
Prints text debug messages.
-
Parameters
-
formatString
|
Takes the following:
|
%%
|
Percent sign
|
%c
|
Single-byte char
|
%s
|
RAM string
|
%p
|
Flash string (does not follow the printf standard)
|
%u
|
Two-byte unsigned decimal
|
%d
|
Two-byte signed decimal
|
%x, %%2x, %%4x
|
1-, 2-, 4-byte hex value (always 0 padded; does not follow the printf standard)
|
◆
emberDebugReportOff()
bool emberDebugReportOff
|
(
|
void
|
|
)
|
|
Turns off all debug output.
-
Returns
-
The current state (true for on, false for off).
◆
emberDebugReportRestore()
void emberDebugReportRestore
|
(
|
bool
|
state
|
)
|
|
Restores the state of the debug output.
-
Parameters
-
state
|
The state returned from
emberDebugReportOff()
. This is done so that debug output is not blindly turned on.
|
◆
emDebugSendVuartMessage()
void emDebugSendVuartMessage
|
(
|
uint8_t *
|
buff,
|
|
|
uint8_t
|
len
|
|
)
|
|
|
Sends VUART data out the debug channel.
-
Parameters
-
buff
|
A pointer to the data to send.
|
len
|
The length of the data to send.
|