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

Method printf

ESP32_AP-Flasher/src/webflasher.cpp:65–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65size_t Logger::printf(const char* format, ...) {
66 char buffer[256];
67 va_list args;
68 va_start(args, format);
69 size_t len = vsnprintf(buffer, sizeof(buffer), format, args);
70 va_end(args);
71 wsSerial(String(buffer));
72
73#ifdef HAS_TFT
74 if (len >= 6 && strncmp(buffer, "\r[", 2) == 0) {
75 char content[50];
76 strncpy(content, buffer + 2, len - 7);
77 content[len - 7] = '\0';
78 tft2.fillRect(0, 50, tft2.width(), 40, TFT_BLUE);
79 tft2.setCursor(10, 57, 2);
80 tft2.setTextColor(TFT_YELLOW);
81 tft2.print(String(content));
82 }
83#endif
84
85 return len;
86}
87
88size_t Logger::println(const char* text) {
89 size_t len = print(text);

Callers 15

copyIfNeededFunction · 0.80
listDirFunction · 0.80
initMethod · 0.80
nrf_read_portMethod · 0.80
nrf_write_portMethod · 0.80
nrf_read_ufcrMethod · 0.80
read_registerMethod · 0.80
write_registerMethod · 0.80
dumpFunction · 0.80
connectTagMethod · 0.80
getFirmwareMD5Method · 0.80
getInfoBlockMacMethod · 0.80

Calls 7

wsSerialFunction · 0.85
strncpyFunction · 0.85
fillRectMethod · 0.80
widthMethod · 0.80
setCursorMethod · 0.80
setTextColorMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected