forked from nuttx/nuttx-update
Add some less-than-perfect macros to provide some implementation of strtof() and strtold()
This commit is contained in:
parent
97b3240737
commit
1cb05d007d
1 changed files with 13 additions and 0 deletions
|
@ -80,6 +80,19 @@
|
|||
# define environ get_environ_ptr()
|
||||
#endif
|
||||
|
||||
/* The functions strtof() and strtold() are not currently implemented in
|
||||
* NuttX. Ideally, custom implementations of these functions to be provided:
|
||||
*
|
||||
* strtof() - Some MCUs, such as the Cortex-M4F, have built in 32-bit FPU.
|
||||
* A true implementation could exploit the improved performance by the
|
||||
* the FPU.
|
||||
* strtold() - Of course, there is a lost of 32-bits of accuracy in this
|
||||
* conversion.
|
||||
*/
|
||||
|
||||
#define strtof(a,b) (float)strtod(a,b)
|
||||
#define strtold(a,b) (long double)strtod(a,b)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
****************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue