Atmel Software Framework

dsp_sprintf.c File Reference
#include <string.h>
#include <stdarg.h>
#include "dsp.h"
#include "dsp_sprintf.h"

Macros

#define PAD_RIGHT   1
 
#define PAD_ZERO   2
 
#define PRINT_BUF_LEN   12
 
#define TEMP_BUFFER_SIZE   32
 

Functions

int dsp16_sprintf (char *out, const char *format,...)
 
int dsp32_sprintf (char *out, const char *format,...)
 
static int dsp_sprint (char **out, int nb_bits, int q, int i)
 
static int dsp_sprint_after_radix (char **out, unsigned int num, unsigned int den, int nb_digits)
 
static int dsp_sprint_fct (char **out, char *str)
 
static char * dsp_sprint_ui (char *out, unsigned int n)
 
static int print (int size, char **out, const char *format, va_list args)
 
static void printchar (char **str, int c)
 
static int printi (char **out, int i, int b, int sg, int width, int pad, int letbase, int printlimit)
 
static int prints (char **out, const char *string, int width, int pad, int printlimit, bool IsNumber)
 

#define PAD_RIGHT   1

Referenced by print(), and prints().

#define PAD_ZERO   2

Referenced by print(), printi(), and prints().

#define PRINT_BUF_LEN   12

Referenced by printi().

#define TEMP_BUFFER_SIZE   32

Referenced by dsp_sprint(), and dsp_sprint_ui().

int dsp16_sprintf ( char *  out,
const char *  format,
  ... 
)

References n, out, and print().

int dsp32_sprintf ( char *  out,
const char *  format,
  ... 
)

References n, out, and print().

static int dsp_sprint ( char **  out,
int  nb_bits,
int  q,
int  i 
)
static
static int dsp_sprint_after_radix ( char **  out,
unsigned int  num,
unsigned int  den,
int  nb_digits 
)
static

References den, dsp_sprint_fct(), i, n, and temp.

Referenced by dsp_sprint().

static int dsp_sprint_fct ( char **  out,
char *  str 
)
static

References n.

Referenced by dsp_sprint(), and dsp_sprint_after_radix().

static char * dsp_sprint_ui ( char *  out,
unsigned int  n 
)
static

References dsp_debug_buffer, i, out, and TEMP_BUFFER_SIZE.

Referenced by dsp_sprint().

static int print ( int  size,
char **  out,
const char *  format,
va_list  args 
)
static
static void printchar ( char **  str,
int  c 
)
static

References c.

Referenced by print(), printi(), and prints().

static int printi ( char **  out,
int  i,
int  b,
int  sg,
int  width,
int  pad,
int  letbase,
int  printlimit 
)
static

References b, i, PAD_ZERO, PRINT_BUF_LEN, printchar(), prints(), s, and width.

Referenced by print().

static int prints ( char **  out,
const char *  string,
int  width,
int  pad,
int  printlimit,
bool  IsNumber 
)
static

References i, PAD_RIGHT, PAD_ZERO, printchar(), and width.

Referenced by print(), and printi().