https://github.com/j123b567/scpi-parser

Dependents:   scpi_sx127x scpi_sx127x_firstTest MLX90418_I2C_master

Embed: (wiki syntax)

« Back to documentation index

utils.h File Reference

utils.h File Reference

Conversion routines and string manipulation routines. More...

Go to the source code of this file.

Functions

size_t SCPI_LongToStr (int32_t val, char *str, size_t len, int8_t base)
 Converts signed 32b integer value to string.
size_t SCPI_DoubleToStr (double val, char *str, size_t len)
 Converts double value to string.

Detailed Description

Conversion routines and string manipulation routines.

Definition in file utils.h.


Function Documentation

size_t SCPI_DoubleToStr ( double  val,
char *  str,
size_t  len 
)

Converts double value to string.

Parameters:
valdouble value
strconverted textual representation
lenstring buffer length
Returns:
number of bytes written to str (without '\0')

Definition at line 142 of file utils.c.

size_t SCPI_LongToStr ( int32_t  val,
char *  str,
size_t  len,
int8_t  base 
)

Converts signed 32b integer value to string.

Parameters:
valinteger value
strconverted textual representation
lenstring buffer length
baseoutput base
Returns:
number of bytes written to str (without '\0')

Definition at line 79 of file utils.c.