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
sd_output.hpp File Reference

SD card log sink for the logger. More...

Detailed Description

SD card log sink for the logger.

Per-boot sequential log files with size and count limits. Buffers writes to a 512-byte sector-aligned buffer and flushes to SD card via FatFs. Call flush() periodically from the main loop (never from ISR).

Usage:

// Mount FatFs first, then:
SdLogConfig cfg;
cfg.millis = sbl::system::timer::millis; // required
SdLogOutput::init(cfg);
// In main loop:
SdLogOutput::write("hello\r\n");
SdLogOutput::flush(); // time-gated, safe to call every iteration
uint32_t millis()
Definition timer.hpp:65

Definition in file sd_output.hpp.

#include "ff.h"
#include <cstring>

Go to the source code of this file.

Classes

struct  sbl::log::SdLogConfig
 
class  sbl::log::SdLogOutput
 

Namespaces

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