You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although (AFAIK) the ESP32 does not need the F() or PROGMEM macro to force a const char * into flash -- a lot of code in the Arduino system contains this.
Secondly - the Print class for the ESP32 currently lacks a vprintf -- which is useful if you override the printf (e.g. for a writev() like approach).
Describe the solution you'd like.
May be useful to kill these two birds with one stone; by splitting the printf and adding the syntactic glue.
github-actionsbot
changed the title
Print::vprintf (and syntactic glue for flash)
Print::vprintf (and syntactic glue for flash) (IDFGH-8582)
Oct 23, 2022
vprintf can easily be added and used to implement printf. My main concern is that by adding size_t Print::printf(const __FlashStringHelper *ifsh, ...) we would lose the compile-time checks when using __FlashStringHelper as we cannot use __attribute__ ((format (printf, 2, 3))) like we do with the regular printf. Idk if that's really safe. Wouldn't it be possible to use the regular Serial.print(const __FlashStringHelper *ifsh) ?
Is your feature request related to a problem?
Although (AFAIK) the ESP32 does not need the F() or PROGMEM macro to force a const char * into flash -- a lot of code in the Arduino system contains this.
Secondly - the Print class for the ESP32 currently lacks a vprintf -- which is useful if you override the printf (e.g. for a writev() like approach).
Describe the solution you'd like.
May be useful to kill these two birds with one stone; by splitting the printf and adding the syntactic glue.
Describe alternatives you've considered.
Adding a vprintf and associated in a class above Print -and inject this.
Additional context.
No response
The text was updated successfully, but these errors were encountered: