MCPcopy Create free account
hub / github.com/FastLED/FastLED / printf

Method printf

src/fl/system/serial.h:277–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276template<typename... Args>
277inline size_t SerialPort::printf(const char* format, Args... args) {
278 if (!format) {
279 return 0;
280 }
281
282 // Format into a fixed-size buffer using fl::snprintf
283 char buffer[256]; // Maximum formatted string length
284 int len = fl::snprintf(buffer, sizeof(buffer), format, args...);
285
286 if (len < 0) {
287 return 0; // Formatting error
288 }
289
290 // Delegate to print() method
291 return print(buffer);
292}
293
294// Global Serial object (Arduino-compatible)
295// FL_MAYBE_UNUSED allows compiler to elide if not used

Callers 1

serial_printf.cppFile · 0.45

Calls 2

snprintfFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected