Microchip® Advanced Software Framework

dsp_debug_printf.c File Reference
#include <string.h>
#include <stdarg.h>
#include "dsp.h"
#include "dsp_debug.h"
#include "dsp_debug_shared.h"

Macros

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

Functions

int dsp16_debug_printf (const char *format,...)
 This function is the printf version for 16-bit Q formatted signed numbers. More...
 
int dsp16_debug_sprintf (char *out, const char *format,...)
 This function is the sprintf version for 16-bit Q formatted signed numbers. More...
 
int dsp32_debug_printf (const char *format,...)
 This function is the printf version for 32-bit Q formatted signed numbers. More...
 
int dsp32_debug_sprintf (char *out, const char *format,...)
 This function is the sprintf version for 32-bit Q formatted signed numbers. More...
 
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().

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

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 PAD_ZERO, PRINT_BUF_LEN, printchar(), prints(), s, and TRUE.

Referenced by print().

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

References FALSE, PAD_RIGHT, PAD_ZERO, printchar(), and TRUE.

Referenced by print(), and printi().