1 | /******************************************
|
2 | ***
|
3 | *** Th-Shell
|
4 | *** Command-Shell for Microcontrollers
|
5 | *** ------------------------------------
|
6 | ***
|
7 | *** Author: Thorsten de Buhr
|
8 | *** eMail: thorsten@lasertechnix.de
|
9 | *** Date started: 20.08.2006
|
10 | *** last Modified: 09.11.2006
|
11 | ***
|
12 | *** Modules:
|
13 | *** --------
|
14 | ***
|
15 | *** thprintf.c, thprintf.h
|
16 | ***
|
17 | ***
|
18 | *** Description:
|
19 | *** -------------
|
20 | ***
|
21 | *** Tiny printf-function, which provides most-used opts of printf.
|
22 | *** Usage is the same as printf
|
23 | ***
|
24 | ***
|
25 | ***
|
26 | ***
|
27 | *** Use is free, could run or not ;-)
|
28 | ***
|
29 | *** U may change every printf in cour code to thprintf, the rest is the same.
|
30 | ***
|
31 | *** U may use:
|
32 | *** %i, %s, %c
|
33 | *** \n, \t
|
34 | ***
|
35 | *** More is not implemented now.
|
36 | ***
|
37 | *** Have fun with this very small print-function, it uses ~300 bytes of code (printf uses >5k!)
|
38 | ***
|
39 | ******************************************/
|
40 |
|
41 | /**
|
42 | * @file thprintf.h
|
43 | * @brief very small printf-func
|
44 | * @author Th. de Buhr (thorsten@lasertechnix.de)
|
45 | * @date 09.11.2006
|
46 | */
|
47 |
|
48 |
|
49 |
|
50 | #ifndef __THPRINTF_H__
|
51 | #define __THPRINTF_H__
|
52 |
|
53 |
|
54 | #define MAX_NUM_LEN 6 ///< max. chars for a number
|
55 | #define MAX_NUM_DEC 10E06 ///< Put the same Number here as in MAX_NUM_LEN
|
56 |
|
57 |
|
58 |
|
59 | int thprintf(char *string, ...);
|
60 |
|
61 |
|
62 |
|
63 | #endif
|