blackboxPrintf - return number of characters written
change fmt to `const char*`
This commit is contained in:
parent
c90231f35c
commit
8d2dc82f4b
|
@ -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
|
||||
|
|
|
@ -36,7 +36,7 @@ uint8_t blackboxWriteChunkSize;
|
|||
|
||||
void blackboxWrite(uint8_t value);
|
||||
|
||||
void blackboxPrintf(char *fmt, ...);
|
||||
int blackboxPrintf(const char *fmt, ...);
|
||||
int blackboxPrint(const char *s);
|
||||
|
||||
void blackboxWriteUnsignedVB(uint32_t value);
|
||||
|
|
Loading…
Reference in New Issue