Macros related to logging. More...
Macros |
|
#define | GOS_DUMP_DEFAULT_FLAGS GOS_DUMP_FLAGS (16, 1, LITTLE, ADD_SPACE, PRINT_ADDRESSES, PRINT_ASCII) |
#define | GOS_DUMP_UINT8_BUFFER (buffer, length, msg) gos_dump_buffer (buffer, length, msg, GOS_DUMP_FLAGS (16, 1, LITTLE, ADD_SPACE, PRINT_ADDRESSES, PRINT_ASCII)) |
#define | GOS_DUMP_FLAGS (row_len, word_len, endian, space, address, ascii) |
#define | GOS_LOG (msg, ...) gos_log (msg, ## __VA_ARGS__) |
General logging macro.
|
|
#define | GOS_VLOG (msg, arg_list) gos_vlog (msg, arg_list) |
General logging macro.
|
|
Enumerations |
|
enum |
gos_dump_flags_t
{ ,
GOS_DUMP_ROW_LEN_2 = (1 << 0 ), GOS_DUMP_ROW_LEN_4 = (2 << 0 ), GOS_DUMP_ROW_LEN_8 = (3 << 0 ), GOS_DUMP_ROW_LEN_16 = (4 << 0 ), GOS_DUMP_ROW_LEN_32 = (5 << 0 ), GOS_DUMP_WORD_LEN_1 = (0 << 3 ), GOS_DUMP_WORD_LEN_2 = (1 << 3 ), GOS_DUMP_WORD_LEN_4 = (2 << 3 ), GOS_DUMP_ENDIAN_LITTLE = (0 << 5 ), GOS_DUMP_ENDIAN_BIG = (1 << 5 ), GOS_DUMP_NO_SPACE = (0 << 6 ), GOS_DUMP_ADD_SPACE = (1 << 6 ), GOS_DUMP_NO_ADDRESSES = (0 << 7 ), GOS_DUMP_PRINT_ADDRESSES = (1 << 7 ), GOS_DUMP_NO_ASCII = (0 << 8 ), GOS_DUMP_PRINT_ASCII = (1 << 8 ) } |
Detailed Description
Macros related to logging.
Macro Definition Documentation
◆ GOS_DUMP_DEFAULT_FLAGS
#define GOS_DUMP_DEFAULT_FLAGS GOS_DUMP_FLAGS (16, 1, LITTLE, ADD_SPACE, PRINT_ADDRESSES, PRINT_ASCII) |
Macro for default log dump flags
- 16 words per row
- 1 byte per word
- Little-endian
- Add spaces between words
- Print addresses
- Print ASCII
◆ GOS_DUMP_FLAGS
#define GOS_DUMP_FLAGS | ( |
row_len,
|
|
word_len,
|
|||
endian,
|
|||
space,
|
|||
address,
|
|||
ascii
|
|||
) |
Value:
(GOS_DUMP_ROW_LEN_ ## row_len | \
GOS_DUMP_WORD_LEN_ ## word_len | \
GOS_DUMP_ENDIAN_ ## endian | \
GOS_DUMP_ ## space | \
GOS_DUMP_ ## address | \
GOS_DUMP_ ## ascii )
Macros for creating dump flags
- Parameters
-
row_len
Row length - 1, 2, 4, 8, 16, 32 word_len
Word length - 1, 2, 4 endian
- Endianness of word - BIG / LITTLE space
- Add spaces between words - NO_SPACE / ADD_SPACE address
- Print buffer addresses - NO_ADDRESSES / PRINT_ADDRESSES ascii
- Print buffer ASCII representation - NO_ASCII / PRINT_ASCII
◆ GOS_DUMP_UINT8_BUFFER
#define GOS_DUMP_UINT8_BUFFER | ( |
buffer,
|
|
length,
|
|||
msg
|
|||
) | gos_dump_buffer (buffer, length, msg, GOS_DUMP_FLAGS (16, 1, LITTLE, ADD_SPACE, PRINT_ADDRESSES, PRINT_ASCII)) |
Helper macro to dump a byte buffer
- Parameters
-
buffer
The byte buffer to dump length
Length of byte buffer msg
Message to print with dump
Enumeration Type Documentation
◆ gos_dump_flags_t
enum gos_dump_flags_t |
Flags for gos_dump_buffer()
See GOS_DUMP_FLAGS for a helper macro to generate the flags.