Loading...
Searching...
No Matches
Object dump

Allows to print out data dumps of memory regions in hexadecimal or/and ASCII representation. More...

Detailed Description

Allows to print out data dumps of memory regions in hexadecimal or/and ASCII representation.

Files

file  od.h
 

Macros

#define OD_WIDTH_DEFAULT   (16)
 Default value for parameter width of od_hex_dump()
 

Functions

void od_hex_dump_ext (const void *data, size_t data_len, uint8_t width, uint32_t offset)
 Dumps memory stored at data byte-wise up to data_len in hexadecimal representation to stdout.
 
static void od_hex_dump (const void *data, size_t data_len, uint8_t width)
 Dumps memory stored at data byte-wise up to data_len in hexadecimal representation to stdout.
 

Macro Definition Documentation

◆ OD_WIDTH_DEFAULT

#define OD_WIDTH_DEFAULT   (16)

Default value for parameter width of od_hex_dump()

Definition at line 34 of file od.h.

Function Documentation

◆ od_hex_dump()

static void od_hex_dump ( const void *  data,
size_t  data_len,
uint8_t  width 
)
inlinestatic

Dumps memory stored at data byte-wise up to data_len in hexadecimal representation to stdout.

If the pseudomodlue od_string is used (USEMODULE += od_string) the ASCII representation of data is also displayed.

Parameters
[in]dataData to dump.
[in]data_lenLength in bytes of data to output.
[in]widthNumber of bytes per line. If width is 0, OD_WIDTH_DEFAULT is assumed as a default value.

Definition at line 65 of file od.h.

◆ od_hex_dump_ext()

void od_hex_dump_ext ( const void *  data,
size_t  data_len,
uint8_t  width,
uint32_t  offset 
)

Dumps memory stored at data byte-wise up to data_len in hexadecimal representation to stdout.

If the pseudomodlue od_string is used (USEMODULE += od_string) the ASCII representation of data is also displayed. The displayed start address of data can be given as offset.

Parameters
[in]dataData to dump.
[in]data_lenLength in bytes of data to output.
[in]widthNumber of bytes per line. If width is 0, OD_WIDTH_DEFAULT is assumed as a default value.
[in]offsetAdds an offset to the printed memory addresses. If the origin of the data is an address in memory, this can be used to print the real addresses together with the data.