*.printf Formats

Description
There are various *.printf functions in Pinguino which use printf.c, an alternative implementation of the stdlib library (stdlib.c), to format data for output. This new library provides simple and small printf functionality for use in embedded systems.

The functions that make use of the Pinguino printf.c library are :-

The Pinguino printf.c library supports the following format specifiers/identifiers: 'd' 'u' 'b' 'o' 'c' 's' 'x' 'X' and 'f'. Zero padding and field width are also supported.

The function makes use of a format string containing one or more format tags and other text to be included in the output.

The format tags take the form : %[flag][width]specifier

Escape Sequences
Certain output devices, e.g. CDC and serial, also support non-printing characters such as [carriage return] and [new line] by including the appropriate "escape" sequences in the format string. \n = new line \r = carriage return

Zero padding and field width
See example below.