Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
banner.hpp File Reference

Boot banner formatter. More...

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:

char buf[384];
int len = sbl::log::format_banner(buf, sizeof(buf),
"hello-instrument", 48000, 48);
SBL_LOG_OUTPUT::write(buf);
Boot banner formatter.
int 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.
Definition banner.hpp:99

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

Definition in file banner.hpp.

#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::log
 Logging.
 

Macros

#define SBL_BOOT_BANNER   1
 
#define SBL_BANNER_HAS_MCU   0
 
#define SBL_BANNER_HAS_TARGET   0
 
#define SBL_BANNER_HAS_VERSION   0
 

Functions

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.
 

Macro Definition Documentation

◆ SBL_BOOT_BANNER

#define SBL_BOOT_BANNER   1

Definition at line 28 of file banner.hpp.

◆ SBL_BANNER_HAS_MCU

#define SBL_BANNER_HAS_MCU   0

Definition at line 36 of file banner.hpp.

◆ SBL_BANNER_HAS_TARGET

#define SBL_BANNER_HAS_TARGET   0

Definition at line 43 of file banner.hpp.

◆ SBL_BANNER_HAS_VERSION

#define SBL_BANNER_HAS_VERSION   0

Definition at line 50 of file banner.hpp.