Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::log::SdLogOutput Class Reference

Detailed Description

Definition at line 36 of file sd_output.hpp.

#include <sd_output.hpp>

Static Public Member Functions

static bool init (const SdLogConfig &cfg={})
 
static void write (const char *str)
 Logger sink interface — buffers data, auto-flushes when buffer is full.
 
static void flush ()
 
static void force_flush ()
 Flush immediately, bypassing time gate.
 
static void close ()
 Close file (flushes first). Call before removing card.
 
static bool is_open ()
 

Member Function Documentation

◆ init()

static bool sbl::log::SdLogOutput::init ( const SdLogConfig &  cfg = {})
inlinestatic

Initialize: scan existing files, create next sequential log. Returns true if log file was opened successfully.

Definition at line 40 of file sd_output.hpp.

◆ write()

static void sbl::log::SdLogOutput::write ( const char *  str)
inlinestatic

Logger sink interface — buffers data, auto-flushes when buffer is full.

Definition at line 60 of file sd_output.hpp.

◆ flush()

static void sbl::log::SdLogOutput::flush ( )
inlinestatic

Time-gated flush. Safe to call every main loop iteration. Only writes to SD if flush_interval_ms has elapsed or buffer is >75% full.

Definition at line 79 of file sd_output.hpp.

References sbl::log::SdLogConfig::flush_interval_ms, and sbl::log::SdLogConfig::millis.

◆ force_flush()

static void sbl::log::SdLogOutput::force_flush ( )
inlinestatic

Flush immediately, bypassing time gate.

Definition at line 96 of file sd_output.hpp.

Referenced by close().

◆ close()

static void sbl::log::SdLogOutput::close ( )
inlinestatic

Close file (flushes first). Call before removing card.

Definition at line 102 of file sd_output.hpp.

References force_flush().

◆ is_open()

static bool sbl::log::SdLogOutput::is_open ( )
inlinestatic

Definition at line 109 of file sd_output.hpp.


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