FreeRTOS Tetris
|
Thread safe printing API. More...
Functions | |
void | fprints (FILE *__restrict __stream, const char *__format,...) |
Prints a formatted string to the specifed IO stream. More... | |
void | prints (const char *__format,...) |
Prints a formatted string to stdout More... | |
int | safePrintInit (void) |
Initializes the printing module. More... | |
void | safePrintExit (void) |
Exits the printing module. | |
Safe print configuration default values | |
Allows for the configuration of each print messages length and the number of print messages that FreeRTOS can buffer | |
#define | SAFE_PRINT_QUEUE_LEN 20 |
#define | SAFE_PRINT_MAX_MSG_LEN 256 |
#define | SAFE_PRINT_STACK_SIZE (SAFE_PRINT_MAX_MSG_LEN * 2) |
#define | SAFE_PRINT_PRIORITY tskIDLE_PRIORITY |
#define | SAFE_PRINT_INPUT_BUFFER_COUNT 10 |
Thread safe printing API.
Provides replacements for printf
and fprintf
with the two functions prints
and fprints
, standing for "print safe".
Both functions are variadic and wrap the standard print functions, meaning their use is identical and as such the documentations for printf
and fprintf
can be used as reference.
The functions also allow writing to any IO stream, prints
is simply a call to fprints
where the IO stream is fixed to stdout
,
void fprints | ( | FILE *__restrict | __stream, |
const char * | __format, | ||
... | |||
) |
#include <TUM_Print.h>
Prints a formatted string to the specifed IO stream.
__stream | IO stream to print to, eg. stdio or stderr |
__format | Formatting string to be printed |
void prints | ( | const char * | __format, |
... | |||
) |
#include <TUM_Print.h>
Prints a formatted string to stdout
__format | Formatting string to be printed |
int safePrintInit | ( | void | ) |