adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
623 stars 497 forks source link

Update itoa.c for -std=c++17 compatibility #610

Closed AnthonyDiGirolamo closed 3 years ago

AnthonyDiGirolamo commented 3 years ago

This change copies over itoa.h and itoa.c from https://github.com/adafruit/ArduinoCore-samd/tree/master/cores/arduino

This adds in the missing utoa and itoa functions when compiling using -std=c++17. This nRF52 core is currently using -std=gnu++11 in platform.txt so this isn't normally an issue.

Tested compiling a few example sketches successfully in the Arduino IDE with this change. Not tested on device, haven't ordered hardware yet.

I'm hoping to get this fixed to add support for building pigweed on top of this core. See https://pigweed.dev/targets/arduino/target_docs.html if interested! :smile: