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
sbl::log::SdLogOutput Class Reference

Detailed Description

Definition at line 39 of file sd_output.hpp.

Static Public Member Functions

static bool init (const SdLogConfig &cfg={})
 
static void write (const char *str)
 
static void flush ()
 
static void force_flush ()
 
static void close ()
 
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 45 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 65 of file sd_output.hpp.

References sbl::log::is_sink_v.

◆ 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 88 of file sd_output.hpp.

References sbl::log::is_sink_v.

◆ force_flush()

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

Flush immediately, bypassing time gate.

Definition at line 106 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 114 of file sd_output.hpp.

References force_flush(), and sbl::log::is_sink_v.

◆ is_open()

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

Definition at line 123 of file sd_output.hpp.


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