Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
sbl::core::util::EmbeddedPrintf Class Reference

Lightweight printf implementation for ARM Cortex-M systems. More...

#include <embedded_printf.hpp>

Collaboration diagram for sbl::core::util::EmbeddedPrintf:

Static Public Member Functions

static int vsnprintf (char *buffer, std::size_t size, const char *format, va_list args)
 Format string with arguments into buffer.
 
static int snprintf (char *buffer, std::size_t size, const char *format,...)
 Format string with arguments into buffer.
 

Detailed Description

Lightweight printf implementation for ARM Cortex-M systems.

Supports only essential format specifiers to minimize code size. Perfect for embedded logging where full printf is overkill.

Definition at line 45 of file embedded_printf.hpp.

Member Function Documentation

◆ snprintf()

static int sbl::core::util::EmbeddedPrintf::snprintf ( char *  buffer,
std::size_t  size,
const char *  format,
  ... 
)
inlinestatic

Format string with arguments into buffer.

Parameters
bufferOutput buffer
sizeBuffer size
formatFormat string
...Variable arguments
Returns
Number of characters written (excluding null terminator)

Definition at line 154 of file embedded_printf.hpp.

References vsnprintf().

Here is the call graph for this function:

◆ vsnprintf()

static int sbl::core::util::EmbeddedPrintf::vsnprintf ( char *  buffer,
std::size_t  size,
const char *  format,
va_list  args 
)
inlinestatic

Format string with arguments into buffer.

Parameters
bufferOutput buffer
sizeBuffer size
formatFormat string
argsVariable arguments
Returns
Number of characters written (excluding null terminator)

Definition at line 56 of file embedded_printf.hpp.

Referenced by sbl::core::util::embedded_snprintf(), sbl::core::util::embedded_vsnprintf(), and snprintf().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: