Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Chprintf

Data Structures

struct  synchronous_print_arg_t
 
union  synchronous_print_arg_t.__unnamed__
 

Macros

#define MAX_FILLER   11
 
#define FLOAT_PRECISION   100000
 
#define CHPRINTF_USE_FLOAT   TRUE
 Float type support. More...
 

Functions

static THD_WORKING_AREA (waSerialPrint, 512)
 
static noreturn void serialPrint (void *arg)
 
static char * long_to_string_with_divisor (char *p, long num, unsigned radix, long divisor)
 
static char * ltoa (char *p, long num, unsigned radix)
 
static void _chvsnprintf (char *buffer, BaseSequentialStream *chp, size_t size, const char *fmt, va_list ap)
 System formatted output function. More...
 
void directchvprintf (BaseSequentialStream *chp, const char *fmt, va_list ap)
 
void chvsnprintf (char *buffer, size_t size, const char *fmt, va_list ap)
 
void chsnprintf (char *buffer, size_t size, const char *fmt,...)
 
void directchprintf (BaseSequentialStream *chp, const char *fmt,...)
 
void chprintf (BaseSequentialStream *lchp, const char *fmt,...)
 
void chvprintf (BaseSequentialStream *lchp, const char *fmt, va_list ap)
 
void smchsnprintf (char *buffer, size_t size, const char *fmt,...)
 
void smchvsnprintf (char *buffer, size_t size, const char *fmt, va_list ap)
 

Variables

static thread_t * printThreadPtr = NULL
 

Detailed Description


Data Structure Documentation

struct synchronous_print_arg_t

Definition at line 43 of file printf.c.

Data Fields
union synchronous_print_arg_t __unnamed__
va_list ap
char * destBuf
const char * fmt
union synchronous_print_arg_t.__unnamed__

Definition at line 44 of file printf.c.

Data Fields
BaseSequentialStream * chp
size_t size

Macro Definition Documentation

#define CHPRINTF_USE_FLOAT   TRUE

Float type support.

Definition at line 40 of file printf.h.

#define FLOAT_PRECISION   100000

Definition at line 41 of file printf.c.

#define MAX_FILLER   11

Definition at line 40 of file printf.c.

Referenced by _chvsnprintf(), and long_to_string_with_divisor().

Function Documentation

static void _chvsnprintf ( char *  buffer,
BaseSequentialStream *  chp,
size_t  size,
const char *  fmt,
va_list  ap 
)
static

System formatted output function.

This function implements a minimal printf() like functionality with output on a BaseSequentialStream. The general parameters format is: %[-][width|*][.precision|*][l|L]p. The following parameter types (p) are supported:

  • x hexadecimal integer.
  • X hexadecimal long.
  • o octal integer.
  • O octal long.
  • d decimal signed integer.
  • D decimal signed long.
  • u decimal unsigned integer.
  • U decimal unsigned long.
  • c character.
  • s string.
Parameters
[in]chppointer to a BaseSequentialStream implementing object
[in]fmtformatting string

Definition at line 169 of file printf.c.

References ltoa(), MAX_FILLER, and p.

Referenced by chsnprintf(), chvsnprintf(), directchprintf(), and directchvprintf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void chprintf ( BaseSequentialStream *  lchp,
const char *  fmt,
  ... 
)

Definition at line 395 of file printf.c.

References synchronous_print_arg_t::destBuf, printThreadPtr, and serialPrint().

+ Here is the call graph for this function:

void chsnprintf ( char *  buffer,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 377 of file printf.c.

References _chvsnprintf().

Referenced by getFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void chvprintf ( BaseSequentialStream *  lchp,
const char *  fmt,
va_list  ap 
)

Definition at line 415 of file printf.c.

References synchronous_print_arg_t::destBuf, printThreadPtr, and serialPrint().

+ Here is the call graph for this function:

void chvsnprintf ( char *  buffer,
size_t  size,
const char *  fmt,
va_list  ap 
)

Definition at line 372 of file printf.c.

References _chvsnprintf().

Referenced by serialPrint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void directchprintf ( BaseSequentialStream *  chp,
const char *  fmt,
  ... 
)

Definition at line 386 of file printf.c.

References _chvsnprintf().

+ Here is the call graph for this function:

void directchvprintf ( BaseSequentialStream *  chp,
const char *  fmt,
va_list  ap 
)

Definition at line 367 of file printf.c.

References _chvsnprintf().

Referenced by serialPrint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* long_to_string_with_divisor ( char *  p,
long  num,
unsigned  radix,
long  divisor 
)
static

Definition at line 90 of file printf.c.

References MAX_FILLER, and p.

Referenced by ltoa().

+ Here is the caller graph for this function:

static char* ltoa ( char *  p,
long  num,
unsigned  radix 
)
static

Definition at line 125 of file printf.c.

References long_to_string_with_divisor().

Referenced by _chvsnprintf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static noreturn void serialPrint ( void *  arg)
static

Definition at line 57 of file printf.c.

References synchronous_print_arg_t::ap, chvsnprintf(), synchronous_print_arg_t::destBuf, directchvprintf(), and synchronous_print_arg_t::fmt.

Referenced by chprintf(), chvprintf(), smchsnprintf(), and smchvsnprintf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void smchsnprintf ( char *  buffer,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 432 of file printf.c.

References synchronous_print_arg_t::destBuf, printThreadPtr, and serialPrint().

+ Here is the call graph for this function:

void smchvsnprintf ( char *  buffer,
size_t  size,
const char *  fmt,
va_list  ap 
)

Definition at line 453 of file printf.c.

References synchronous_print_arg_t::destBuf, printThreadPtr, and serialPrint().

+ Here is the call graph for this function:

static THD_WORKING_AREA ( waSerialPrint  ,
512   
)
static

Variable Documentation

thread_t* printThreadPtr = NULL
static

Definition at line 53 of file printf.c.

Referenced by chprintf(), chvprintf(), smchsnprintf(), and smchvsnprintf().