Skip to content

Serial.printf support #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kakopappa opened this issue Jul 19, 2024 · 1 comment
Closed

Serial.printf support #351

kakopappa opened this issue Jul 19, 2024 · 1 comment
Assignees
Labels
conclusion: off topic Off topic for this repository type: enhancement Proposed improvement

Comments

@kakopappa
Copy link

kakopappa commented Jul 19, 2024

I noticed Serial does not support Serial.printf. This is what I have done so far. could be wrong Please correct me if I am wrong here.

in Print.h

size_t printf(const char *format, ...);

in Print.cpp

#include <stdarg.h> // Required for va_list, va_start, va_end
.....

size_t Print::printf(const char *format, ...) {
  va_list arg;
  va_start(arg, format);
  size_t ret = vprintf(format, arg);
  va_end(arg);
  return ret;
}
@per1234 per1234 self-assigned this Jul 21, 2024
@per1234 per1234 added the type: enhancement Proposed improvement label Jul 21, 2024
@per1234
Copy link
Collaborator

per1234 commented Jul 21, 2024

Closing as off topic since the Print class is not implemented in this repository, but instead in https://github.com/arduino/ArduinoCore-API.

We already have a request in that repository: arduino/ArduinoCore-API#32

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2024
@per1234 per1234 added the conclusion: off topic Off topic for this repository label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: off topic Off topic for this repository type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants