We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 893df5c commit c3d85f6Copy full SHA for c3d85f6
cores/nRF5/Print.cpp
@@ -22,9 +22,15 @@
22
#include <string.h>
23
#include <math.h>
24
#include "Arduino.h"
25
+#include "libc/printf/printf.h"
26
27
#include "Print.h"
28
29
+extern "C" void streamOutput(char c, void* arg)
30
+{
31
+ (static_cast<Print *>(arg))->write(c);
32
+}
33
+
34
// Public Methods //////////////////////////////////////////////////////////////
35
36
/* default implementation: may be overridden */
@@ -191,7 +197,7 @@ int Print::printf(const char* format, ...)
191
197
{
192
198
va_list va;
193
199
va_start(va, format);
194
- int ret = vprintf(format, va);
200
+ int ret = vfctprintf(&streamOutput, this, format, va);
195
201
va_end(va);
196
202
return ret;
203
}
0 commit comments