Skip to content

Commit

Permalink
feat: Adds printf
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui committed Dec 14, 2024
1 parent d8397fd commit b8b53ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli/conio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit b8b53ce

Please sign in to comment.