pretty_format.h 734 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <core/string.h>
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define PRETTY_FORMAT_FONT_BOLD "\e#"
  7. #define PRETTY_FORMAT_FONT_MONOSPACE "\e*"
  8. /**
  9. * Format a data buffer as a canonical HEX dump
  10. * @param [out] result pointer to the output string (must be initialised)
  11. * @param [in] num_places the number of bytes on one line (both as HEX and ASCII)
  12. * @param [in] line_prefix if not NULL, prepend this string to each line
  13. * @param [in] data pointer to the input data buffer
  14. * @param [in] data_size input data size
  15. */
  16. void pretty_format_bytes_hex_canonical(
  17. FuriString* result,
  18. size_t num_places,
  19. const char* line_prefix,
  20. const uint8_t* data,
  21. size_t data_size);
  22. #ifdef __cplusplus
  23. }
  24. #endif