1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

blackboxPrintf - return number of characters written

change fmt to `const char*`
This commit is contained in:
Petr Ledvina 2015-03-14 17:52:15 +01:00
parent c90231f35c
commit 8d2dc82f4b
2 changed files with 4 additions and 3 deletions

View file

@ -91,12 +91,13 @@ static void _putc(void *p, char c)
}
//printf() to the blackbox serial port with no blocking shenanigans (so it's caller's responsibility to not write too fast!)
void blackboxPrintf(char *fmt, ...)
int blackboxPrintf(const char *fmt, ...)
{
va_list va;
va_start(va, fmt);
tfp_format(NULL, _putc, fmt, va);
int written = tfp_format(NULL, _putc, fmt, va);
va_end(va);
return written;
}
// Print the null-terminated string 's' to the serial port and return the number of bytes written