core: serial: implement Serial.printf()#305
core: serial: implement Serial.printf()#305silabs-bozont wants to merge 1 commit intoarduino:mainfrom
Conversation
4d462a3 to
80c019b
Compare
80c019b to
d0b1e5e
Compare
I will second that sentiment! Would expand that to all zephyr boards - probably add it to prj.conf. |
per1234
left a comment
There was a problem hiding this comment.
Thanks for taking the time to submit this pull request @silabs-bozont!
If this is to be done, it must be implemented in the Print class.
There is already a proposal for that here:
arduino/ArduinoCore-API#28
|
@per1234 Just a thought. Also just read in post 2 from Paul
so not sure what is up! |
|
@silabs-bozont - I totally agree with you on the desire to have printf. Was going to mention that on the Teensy instead of needing a large buffer to use sprintf, instead: It was also interesting that on MBED versions, we at times could cheat and use the macro: Other options is to use:
@per1234 - I personally think that Arduino should prune stuff out, like this, that are over N years old. Sort of similar that I know every so often I will go through some of my own PRs and Issues and close them out as detritus . |
Hey!
I often find it useful to have a
printffunction in the Serial class, so I implemented it for this core too.It's optional and turned off by default for all boards - but is explicitly enabled on the Nano Matter.
It can be turned on for any board with
CONFIG_ARDUINO_SERIAL_PRINTF=yand the buffer size is also configurable.Let me know what you think!