Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
banner.hpp File Reference

Boot banner formatter. More...

#include <cstddef>
#include <cstdint>
Include dependency graph for banner.hpp:

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs functionality.
 
namespace  sbl::log
 Lightweight logging system.
 
namespace  sbl::log::detail
 

Macros

#define SBL_BOOT_BANNER   1
 
#define SBL_BANNER_HAS_MCU   0
 
#define SBL_BANNER_HAS_SYSTEM   0
 
#define SBL_BANNER_HAS_VERSION   0
 

Functions

int sbl::log::detail::banner_append (char *buf, size_t size, int pos, const char *str)
 
int sbl::log::detail::banner_append_uint (char *buf, size_t size, int pos, uint32_t val)
 
int sbl::log::format_banner (char *buf, size_t size, const char *app_name, uint32_t sample_rate, uint16_t block_size)
 Format a boot banner into a buffer.
 

Detailed Description

Boot banner formatter.

Formats a startup banner with app name, build info, MCU metadata, and audio configuration. Uses __has_include for optional headers so it works in both firmware and unit test builds.

Usage: #include <sbl/log/banner.hpp>

char buf[384]; int len = sbl::log::format_banner(buf, sizeof(buf), "hello-instrument", 48000, 48); SBL_LOG_OUTPUT::write(buf);

Gated behind SBL_BOOT_BANNER (default: 1). Set to 0 to disable.

Definition in file banner.hpp.

Macro Definition Documentation

◆ SBL_BANNER_HAS_MCU

#define SBL_BANNER_HAS_MCU   0

Definition at line 33 of file banner.hpp.

◆ SBL_BANNER_HAS_SYSTEM

#define SBL_BANNER_HAS_SYSTEM   0

Definition at line 40 of file banner.hpp.

◆ SBL_BANNER_HAS_VERSION

#define SBL_BANNER_HAS_VERSION   0

Definition at line 47 of file banner.hpp.

◆ SBL_BOOT_BANNER

#define SBL_BOOT_BANNER   1

Definition at line 25 of file banner.hpp.