printf_lib.h File Reference
Contains printf library to use inside ISR, or print data on heap. More...
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
int | u0_dbg_printf (const char *format,...) |
void | u0_dbg_put (const char *string) |
char * | mprintf (const char *format,...) |
Detailed Description
Contains printf library to use inside ISR, or print data on heap.
Function Documentation
char* mprintf | ( | const char * | format, |
... | |||
) |
Prints a formatted string on a heap pointer and returns it back.
- Parameters
-
[in] format The printf format string [in] ... The printf arguments
- Returns
- The pointer to the printed string
- Warning
- Use this function carefully as it can fragment memory on a system if used excessively.
- Pointer obtained from this function must be freed.
int u0_dbg_printf | ( | const char * | format, |
... | |||
) |
Prints a debug statement. This is same as printf(), but will ensure that all data sent over uart0 is flushed completely. This solves the problem where one can printf() something immediately because it is possible that regular printf() may queue the data and the system crashes before anything useful was printed.
- Parameters
-
[in] format The printf format string [in] ... The printf arguments
void u0_dbg_put | ( | const char * | string | ) |
Prints a string to uart and returns after entire string is printed.
- Parameters
-
[in] string NULL terminated string to print