From b8b53ce9fd122da6455595b3c67084f5aaf87755 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Fri, 13 Dec 2024 16:27:47 -0800 Subject: [PATCH] feat: Adds printf --- src/cli/conio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli/conio.cpp b/src/cli/conio.cpp index 47ec87a..7704078 100644 --- a/src/cli/conio.cpp +++ b/src/cli/conio.cpp @@ -83,9 +83,13 @@ extern "C" va_list vargs; int nBytes = 0; va_start(vargs, fmt); +#if SF_PLATFORM == SF_PLATFORM_PARTICLE nBytes = vsnprintf(SF_OSAL_printfBuffer, SF_OSAL_PRINTF_BUFLEN, fmt, vargs); - va_end(vargs); Serial.write(SF_OSAL_printfBuffer); +#elif SF_PLATFORM == SF_PLATFORM_GLIBC + nBytes = vprintf(fmt, vargs); +#endif + va_end(vargs); return nBytes; } } \ No newline at end of file