Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
Chprintf

Data Structures

struct  synchronous_print_arg_t
 
union  synchronous_print_arg_t.__unnamed298__
 

Macros

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

Functions

static THD_WORKING_AREA (waSerialPrint, 512)
 
static noreturn void serialPrint (void *arg)
 
static charlong_to_string_with_divisor (char *p, long num, unsigned radix, long divisor)
 
static charltoa (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.
 
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_tprintThreadPtr = NULL
 

Detailed Description


Data Structure Documentation

◆ synchronous_print_arg_t

struct synchronous_print_arg_t

Definition at line 43 of file printf.c.

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

◆ synchronous_print_arg_t.__unnamed298__

union synchronous_print_arg_t.__unnamed298__

Definition at line 44 of file printf.c.

Data Fields
BaseSequentialStream * chp
size_t size

Macro Definition Documentation

◆ CHPRINTF_USE_FLOAT

#define CHPRINTF_USE_FLOAT   TRUE

Float type support.

Definition at line 40 of file printf.h.

◆ FLOAT_PRECISION

#define FLOAT_PRECISION   100000

Definition at line 41 of file printf.c.

◆ MAX_FILLER

#define MAX_FILLER   11

Definition at line 40 of file printf.c.

Function Documentation

◆ _chvsnprintf()

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 foo, ltoa(), MAX_FILLER, p, and s.

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chprintf()

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

Definition at line 395 of file printf.c.

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

Referenced by cmd_abi(), cmd_info(), cmd_mem(), microrlSigint(), and usage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chsnprintf()

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

Definition at line 377 of file printf.c.

References _chvsnprintf(), and foo.

Referenced by getFileName(), and thd_startlog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chvprintf()

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

Definition at line 415 of file printf.c.

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

+ Here is the call graph for this function:

◆ chvsnprintf()

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

Definition at line 372 of file printf.c.

References _chvsnprintf(), and foo.

Referenced by serialPrint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ directchprintf()

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

Definition at line 386 of file printf.c.

References _chvsnprintf(), and foo.

+ Here is the call graph for this function:

◆ directchvprintf()

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

Definition at line 367 of file printf.c.

References _chvsnprintf(), and foo.

Referenced by serialPrint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ long_to_string_with_divisor()

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 foo, MAX_FILLER, and p.

Referenced by ltoa().

+ Here is the caller graph for this function:

◆ ltoa()

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

Definition at line 125 of file printf.c.

References foo, long_to_string_with_divisor(), and p.

Referenced by _chvsnprintf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialPrint()

static noreturn void serialPrint ( void arg)
static

Definition at line 57 of file printf.c.

References chvsnprintf(), directchvprintf(), and foo.

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ smchsnprintf()

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

Definition at line 432 of file printf.c.

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

+ Here is the call graph for this function:

◆ smchvsnprintf()

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, foo, printThreadPtr, and serialPrint().

+ Here is the call graph for this function:

◆ THD_WORKING_AREA()

static THD_WORKING_AREA ( waSerialPrint  ,
512   
)
static

Variable Documentation

◆ printThreadPtr

thread_t* printThreadPtr = NULL
static

Definition at line 53 of file printf.c.

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