Sound Byte Libs 29c5ff3
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::log::SdLogOutput Class Reference

#include <sd_output.hpp>

Collaboration diagram for sbl::log::SdLogOutput:

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 ()
 

Detailed Description

Definition at line 35 of file sd_output.hpp.

Member Function Documentation

◆ close()

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

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

Definition at line 101 of file sd_output.hpp.

References force_flush().

Here is the call graph for this function:

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

Referenced by close().

Here is the caller graph for this function:

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

◆ is_open()

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

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


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