FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tinyprintf.c File Reference

Data Structures

struct  param
 
struct  _vsnprintf_putcf_data
 
struct  _vsprintf_putcf_data
 

Macros

#define PRINTF_LONG_SUPPORT
 
#define PRINTF_LONG_LONG_SUPPORT
 
#define PRINTF_SIZE_T_SUPPORT
 
#define PRINTF_LONG_SUPPORT
 
#define _TFP_GCC_NO_INLINE_
 

Functions

static void _TFP_GCC_NO_INLINE_ ulli2a (unsigned long long int num, struct param *p)
 
static void lli2a (long long int num, struct param *p)
 
static void uli2a (unsigned long int num, struct param *p)
 
static void li2a (long num, struct param *p)
 
static void ui2a (unsigned int num, struct param *p)
 
static void i2a (int num, struct param *p)
 
static int a2d (char ch)
 
static char a2u (char ch, const char **src, int base, unsigned int *nump)
 
static void putchw (void *putp, putcf putf, struct param *p)
 
void tfp_format (void *putp, putcf putf, const char *fmt, va_list va)
 
void init_printf (void *putp, putcf putf)
 
void tfp_printf (char *fmt,...)
 
static void _vsnprintf_putcf (void *p, char c)
 
int vsnprintf (char *str, size_t size, const char *format, va_list ap)
 
int snprintf (char *str, size_t size, const char *format,...)
 
static void _vsprintf_putcf (void *p, char c)
 
int vsprintf (char *str, const char *format, va_list ap)
 
int sprintf (char *str, const char *format,...)
 

Variables

static putcf stdout_putf
 
static void * stdout_putp
 

Macro Definition Documentation

#define _TFP_GCC_NO_INLINE_
#define PRINTF_LONG_LONG_SUPPORT
#define PRINTF_LONG_SUPPORT
#define PRINTF_LONG_SUPPORT
#define PRINTF_SIZE_T_SUPPORT

Function Documentation

static void _vsnprintf_putcf ( void *  p,
char  c 
)
static
static void _vsprintf_putcf ( void *  p,
char  c 
)
static
static int a2d ( char  ch)
static

Referenced by a2u().

static char a2u ( char  ch,
const char **  src,
int  base,
unsigned int *  nump 
)
static

References a2d().

Referenced by tfp_format().

static void i2a ( int  num,
struct param p 
)
static

References param::sign, and ui2a().

Referenced by tfp_format().

void init_printf ( void *  putp,
putcf  putf 
)

References stdout_putf, and stdout_putp.

static void li2a ( long  num,
struct param p 
)
static

References param::sign, and uli2a().

Referenced by tfp_format().

static void lli2a ( long long int  num,
struct param p 
)
static

References param::sign, and ulli2a().

Referenced by tfp_format().

static void putchw ( void *  putp,
putcf  putf,
struct param p 
)
static
int snprintf ( char *  str,
size_t  size,
const char *  format,
  ... 
)

References vsnprintf().

int sprintf ( char *  str,
const char *  format,
  ... 
)

References vsprintf().

Referenced by helloworld().

void tfp_format ( void *  putp,
putcf  putf,
const char *  fmt,
va_list  va 
)
void tfp_printf ( char *  fmt,
  ... 
)
static void ui2a ( unsigned int  num,
struct param p 
)
static

References param::base, param::bf, and param::uc.

Referenced by i2a(), and tfp_format().

static void uli2a ( unsigned long int  num,
struct param p 
)
static

References param::base, param::bf, and param::uc.

Referenced by li2a(), and tfp_format().

static void _TFP_GCC_NO_INLINE_ ulli2a ( unsigned long long int  num,
struct param p 
)
static

References param::base, param::bf, and param::uc.

Referenced by lli2a(), and tfp_format().

int vsnprintf ( char *  str,
size_t  size,
const char *  format,
va_list  ap 
)
int vsprintf ( char *  str,
const char *  format,
va_list  ap 
)

Variable Documentation

putcf stdout_putf
static

Referenced by init_printf(), and tfp_printf().

void* stdout_putp
static

Referenced by init_printf(), and tfp_printf().