Macros | Enumerations | Functions
fsl_str.c File Reference
#include <math.h>
#include <stdarg.h>
#include <stdlib.h>
#include "fsl_str.h"
#include "fsl_debug_console_conf.h"
Include dependency graph for fsl_str.c:

Go to the source code of this file.

Macros

#define HUGE_VAL   (99.e99)
 The overflow value. More...
 
#define MAX_FIELD_WIDTH   99U
 

Enumerations

enum  _debugconsole_scanf_flag {
  kSCANF_Suppress = 0x2U, kSCANF_DestMask = 0x7cU, kSCANF_DestChar = 0x4U, kSCANF_DestString = 0x8U,
  kSCANF_DestSet = 0x10U, kSCANF_DestInt = 0x20U, kSCANF_DestFloat = 0x30U, kSCANF_LengthMask = 0x1f00U,
  kSCANF_TypeSinged = 0x2000U
}
 Specification modifier flags for scanf. More...
 

Functions

static int32_t ConvertRadixNumToString (char *numstr, void *nump, int32_t neg, int32_t radix, bool use_caps)
 Converts a radix number to a string and return its length. More...
 
static uint32_t PrintGetPrecision (const char **s, va_list *ap, bool *valid_precision_width)
 
static uint8_t PrintGetRadixFromobpu (const char c)
 
static uint32_t PrintGetWidth (const char **p, va_list *ap)
 
static uint32_t PrintIsdi (const char c)
 
static uint32_t PrintIsfF (const char c)
 
static uint32_t PrintIsobpu (const char c)
 
static uint32_t PrintIsxX (const char c)
 
static void PrintOutputdifFobpu (uint32_t flags_used, uint32_t field_width, uint32_t vlen, char schar, char *vstrp, printfCb cb, char *buf, int32_t *count)
 
static void PrintOutputxX (uint32_t flags_used, uint32_t field_width, uint32_t vlen, bool use_caps, char *vstrp, printfCb cb, char *buf, int32_t *count)
 
static uint32_t ScanIgnoreWhiteSpace (const char **s)
 Keil: suppress ellipsis warning in va_arg usage below. More...
 
static uint32_t ScanIsWhiteSpace (const char c)
 
int StrFormatPrintf (const char *fmt, va_list ap, char *buf, printfCb cb)
 This function outputs its parameters according to a formatted string. More...
 
static uint8_t StrFormatScanCheckSymbol (const char *p, int8_t *neg)
 
int StrFormatScanf (const char *line_ptr, char *format, va_list args_ptr)
 Converts an input line of ASCII characters based upon a provided string format. More...
 
static uint8_t StrFormatScanFillInteger (uint32_t flag, va_list *args_ptr, int32_t val)
 
static uint8_t StrFormatScanfStringHandling (char **str, uint32_t *flag, uint32_t *field_width, uint8_t *base)
 
static uint8_t StrFormatScanGetBase (uint8_t base, const char *s)
 
static uint8_t StrFormatScanIsFormatStarting (char *c)
 

Macro Definition Documentation

◆ HUGE_VAL

#define HUGE_VAL   (99.e99)

The overflow value.

Definition at line 21 of file fsl_str.c.

◆ MAX_FIELD_WIDTH

#define MAX_FIELD_WIDTH   99U

Definition at line 25 of file fsl_str.c.

Enumeration Type Documentation

◆ _debugconsole_scanf_flag

Specification modifier flags for scanf.

Enumerator
kSCANF_Suppress 

Suppress Flag.

kSCANF_DestMask 

Destination Mask.

kSCANF_DestChar 

Destination Char Flag.

kSCANF_DestString 

Destination String FLag.

kSCANF_DestSet 

Destination Set Flag.

kSCANF_DestInt 

Destination Int Flag.

kSCANF_DestFloat 

Destination Float Flag.

kSCANF_LengthMask 

Length Mask Flag.

kSCANF_TypeSinged 

TypeSinged Flag.

Definition at line 45 of file fsl_str.c.

Function Documentation

◆ ConvertRadixNumToString()

static int32_t ConvertRadixNumToString ( char *  numstr,
void *  nump,
int32_t  neg,
int32_t  radix,
bool  use_caps 
)
static

Converts a radix number to a string and return its length.

Parameters
[in]numstrConverted string of the number.
[in]numpPointer to the number.
[in]negPolarity of the number.
[in]radixThe radix to be converted to.
[in]use_capsUsed to identify x/X output format.
Returns
Length of the converted string.

Definition at line 514 of file fsl_str.c.

◆ PrintGetPrecision()

static uint32_t PrintGetPrecision ( const char **  s,
va_list *  ap,
bool *  valid_precision_width 
)
static

Definition at line 173 of file fsl_str.c.

◆ PrintGetRadixFromobpu()

static uint8_t PrintGetRadixFromobpu ( const char  c)
static

Definition at line 466 of file fsl_str.c.

◆ PrintGetWidth()

static uint32_t PrintGetWidth ( const char **  p,
va_list *  ap 
)
static

Definition at line 144 of file fsl_str.c.

◆ PrintIsdi()

static uint32_t PrintIsdi ( const char  c)
static

Definition at line 240 of file fsl_str.c.

◆ PrintIsfF()

static uint32_t PrintIsfF ( const char  c)
static

Definition at line 364 of file fsl_str.c.

◆ PrintIsobpu()

static uint32_t PrintIsobpu ( const char  c)
static

Definition at line 230 of file fsl_str.c.

◆ PrintIsxX()

static uint32_t PrintIsxX ( const char  c)
static

Definition at line 374 of file fsl_str.c.

◆ PrintOutputdifFobpu()

static void PrintOutputdifFobpu ( uint32_t  flags_used,
uint32_t  field_width,
uint32_t  vlen,
char  schar,
char *  vstrp,
printfCb  cb,
char *  buf,
int32_t *  count 
)
static

Definition at line 250 of file fsl_str.c.

◆ PrintOutputxX()

static void PrintOutputxX ( uint32_t  flags_used,
uint32_t  field_width,
uint32_t  vlen,
bool  use_caps,
char *  vstrp,
printfCb  cb,
char *  buf,
int32_t *  count 
)
static

Definition at line 303 of file fsl_str.c.

◆ ScanIgnoreWhiteSpace()

static uint32_t ScanIgnoreWhiteSpace ( const char **  s)
static

Keil: suppress ellipsis warning in va_arg usage below.

Scanline function which ignores white spaces.

Parameters
[in]sThe address of the string pointer to update.
Returns
String without white spaces.

Definition at line 499 of file fsl_str.c.

◆ ScanIsWhiteSpace()

static uint32_t ScanIsWhiteSpace ( const char  c)
static

Definition at line 489 of file fsl_str.c.

◆ StrFormatScanCheckSymbol()

static uint8_t StrFormatScanCheckSymbol ( const char *  p,
int8_t *  neg 
)
static

Definition at line 1031 of file fsl_str.c.

◆ StrFormatScanFillInteger()

static uint8_t StrFormatScanFillInteger ( uint32_t  flag,
va_list *  args_ptr,
int32_t  val 
)
static

Definition at line 1052 of file fsl_str.c.

◆ StrFormatScanfStringHandling()

static uint8_t StrFormatScanfStringHandling ( char **  str,
uint32_t *  flag,
uint32_t *  field_width,
uint8_t *  base 
)
static

Definition at line 1153 of file fsl_str.c.

◆ StrFormatScanGetBase()

static uint8_t StrFormatScanGetBase ( uint8_t  base,
const char *  s 
)
static

Definition at line 1008 of file fsl_str.c.

◆ StrFormatScanIsFormatStarting()

static uint8_t StrFormatScanIsFormatStarting ( char *  c)
static

Definition at line 989 of file fsl_str.c.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57