Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

printf() Function Library (rprintf.c)
[General Libraries]


Detailed Description

 #include "rprintf.h" 
Overview
The rprintf function library provides a simplified (reduced) version of the common C printf() function.  See the code files for details about which printf features are supported.  Also in this library are a variety of functions for fast printing of certain common data types (variable types).  Functions include print string from RAM, print string from ROM, print string snippet, print hex byte/short/long, and a custom-formatted number print, as well as an optional floating-point print routine.
Note:
All output from the rprintf library can be directed to any device or software which accepts characters.  This means that rprintf output can be sent to the UART (serial port) or can be used with the LCD display libraries to print formatted text on the screen.


Defines

#define RPRINTF_SIMPLE
#define STRING_IN_RAM   0
#define STRING_IN_ROM   1
#define rprintfProgStrM(string)   (rprintfStr(string))
#define rprintf1(format, args...)   rprintf1RamRom(STRING_IN_ROM, PSTR(format), ## args)
#define rprintf1RAM(format, args...)   rprintf1RamRom(STRING_IN_RAM, format, ## args)
#define rprintf(format, args...)   rprintf1RamRom(STRING_IN_RAM, format, ## args)

Functions

void rprintfInit (void(*putchar_func)(unsigned char c))
 initializes the rprintf library for an output stream
void rprintfChar (unsigned char c)
 prints a single character to the current output device
void rprintfStr (char str[])
 prints a null-terminated string stored in RAM
void rprintfStrLen (char str[], unsigned char start, unsigned char len)
 prints a section of a string stored in RAM
void rprintfProgStr (char str[])
 prints a string stored in program rom
void rprintfCRLF (void)
 prints a carriage return and line feed
void rprintfu04 (unsigned char data)
 print 4-bit hex number
void rprintfu08 (unsigned char data)
 print 8-bit hex number
void rprintfu16 (unsigned short data)
 print 16-bit hex number
void rprintfu32 (unsigned long data)
 print 32-bit hex number
void rprintfNum (char base, char numDigits, char isSigned, char padchar, long n)
 a flexible integer number printing routine
int rprintf1RamRom (unsigned char stringInRom, const char *format,...)
 called by rprintf() - does a simple printf (supports d, x, c)


Generated on Mon Nov 6 23:37:00 2006 for Procyon ARMlib by  doxygen 1.4.2