unleashed-firmware/lib/toolbox/pretty_format.h
hedger ffa3996a5e
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false
* clang-format: InsertNewlineAtEOF: true
* clang-format: Standard:        c++20
* clang-format: AlignConsecutiveBitFields
* clang-format: AlignConsecutiveMacros
* clang-format: RemoveParentheses: ReturnStatement
* clang-format: RemoveSemicolon: true
* Restored RemoveParentheses: Leave, retained general changes for it
* formatting: fixed logging TAGs
* Formatting update for dev

Co-authored-by: あく <alleteam@gmail.com>
2024-07-15 13:38:49 +09:00

29 lines
739 B
C

#pragma once
#include <core/string.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PRETTY_FORMAT_FONT_BOLD "\e#"
#define PRETTY_FORMAT_FONT_MONOSPACE "\e*"
/**
* Format a data buffer as a canonical HEX dump
* @param [out] result pointer to the output string (must be initialised)
* @param [in] num_places the number of bytes on one line (both as HEX and ASCII)
* @param [in] line_prefix if not NULL, prepend this string to each line
* @param [in] data pointer to the input data buffer
* @param [in] data_size input data size
*/
void pretty_format_bytes_hex_canonical(
FuriString* result,
size_t num_places,
const char* line_prefix,
const uint8_t* data,
size_t data_size);
#ifdef __cplusplus
}
#endif