printf_lib.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "printf_lib.h"
#include "uart0_min.h"
#include "sys_config.h"
#include "FreeRTOS.h"
Include dependency graph for printf_lib.c:

Functions | |
__attribute__ ((used)) | |
Un-used function that uses assembly symbols to bring in support for floating-point printf() / scanf() More... | |
int | u0_dbg_printf (const char *format,...) |
void | u0_dbg_put (const char *string) |
char * | mprintf (const char *format,...) |
Function Documentation
__attribute__ | ( | (used) | ) |
Un-used function that uses assembly symbols to bring in support for floating-point printf() / scanf()
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