Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
ascii_support.cpp File Reference

Simple and fast ASCII converters (implementation) More...

#include "embedded_memory.h"
#include "embedded_math.h"
#include "ascii_support.h"
#include <stdlib.h>

Go to the source code of this file.

Macros

#define isdigit(c)   (c >= '0' && c <= '9')
 

Functions

charitoa (int value, char *result, int base)
 
charutox (char *result, uint32_t value, uint8_t nibbles)
 
charlutox (char *result, uint64_t value)
 
charmy_itoa (char *target, int value)
 
charmy_ftoa (char *target, float value)
 
void portable_ftoa (char *res, float value, unsigned no_of_decimals, unsigned res_len)
 
charformat_integer (char *s, int32_t value)
 signed integer to ASCII returning the string end
 
float my_atof (const char *s)
 

Detailed Description

Simple and fast ASCII converters (implementation)

Author
Dr. Klaus Schaefer

<Larus Flight Sensor Firmware>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file ascii_support.cpp.

Macro Definition Documentation

◆ isdigit

#define isdigit (   c)    (c >= '0' && c <= '9')

Definition at line 214 of file ascii_support.cpp.

Function Documentation

◆ format_integer()

char * format_integer ( char s,
int32_t  value 
)

signed integer to ASCII returning the string end

Definition at line 196 of file ascii_support.cpp.

References format_integer(), and s.

Referenced by format_integer(), format_PLARV(), format_PLARW(), to_ascii_1_decimal(), and to_ascii_2_decimals().

◆ itoa()

char * itoa ( int  value,
char result,
int  base 
)

Definition at line 32 of file ascii_support.cpp.

Referenced by serial_output::puti().

◆ lutox()

char * lutox ( char result,
uint64_t  value 
)

Definition at line 71 of file ascii_support.cpp.

References utox().

◆ my_atof()

float my_atof ( const char s)

Definition at line 215 of file ascii_support.cpp.

References a, isdigit, and s.

◆ my_ftoa()

char * my_ftoa ( char target,
float  value 
)

◆ my_itoa()

char * my_itoa ( char target,
int  value 
)

Definition at line 79 of file ascii_support.cpp.

References my_itoa().

Referenced by my_ftoa(), and my_itoa().

◆ portable_ftoa()

void portable_ftoa ( char res,
float  value,
unsigned  no_of_decimals,
unsigned  res_len 
)

Definition at line 146 of file ascii_support.cpp.

◆ utox()

char * utox ( char result,
uint32_t  value,
uint8_t  nibbles 
)

Definition at line 59 of file ascii_support.cpp.

Referenced by lutox(), and serial_output::putx().