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 :-)
36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
/*
|
|
Copyright (c) 2015 Arduino LLC. All right reserved.
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
See the GNU Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"{
|
|
#endif
|
|
|
|
//extern void itoa( int n, char s[] ) ;
|
|
|
|
extern char* itoa( int value, char *string, int radix ) ;
|
|
extern char* ltoa( long value, char *string, int radix ) ;
|
|
extern char* utoa( unsigned int value, char *string, int radix ) ;
|
|
extern char* ultoa( unsigned long value, char *string, int radix ) ;
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|