Custom printf: Implementation More...
#include "..\includes.h"
Macros | |
#define | INC_CPRINTF |
#define | CP_FLAG_CLS 1 |
#define | CP_FLAG_CLL 2 |
#define | CP_FLAG_STDERR 4 |
#define | CPRINTF_NO_ERROR CPrintfMessages[0] |
#define | CPRINTF_SUCCESS CPrintfMessages[1] |
#define | CPRINTF_ERROR CPrintfMessages[2] |
#define | CPRINTF_SKIPPED CPrintfMessages[3] |
#define | CPRINTF_NO_DEVICE CPrintfMessages[4] |
#define | CPRINTF_BUFFER_OVERFLOW CPrintfMessages[5] |
Functions | |
uint16_t | CPrintf_select_output (uint16_t device) |
void | CPrintfActivateOutput (void) |
activate all initialized output devices More... | |
int | CPuts (const char *_ptr) |
int | CPrintf (const char *_format,...) |
Custom printf function. More... | |
void | CPrintChar (const char symbol, size_t count) |
Custom print char function. More... | |
uint16_t | CPrintAnimatedSymbol (char *c, time_t period, size_t size) |
int32_t | CPrintProgressBar (char c, time_t period, size_t length) |
int32_t | CPrintProgressBarText (char c, time_t period, size_t length, char *text) |
Variables | |
uint16_t | output_device = CPRINTF_NO_OUTPUT |
Select active output device. More... | |
static uint16_t | Initialized = 0 |
uint16_t | CPrintfFlags = 0 |
char | CPrintf_raw_buffer [CPRINTF_BUFFER_SIZE] |
static conversion buffer More... | |
char | CPrintf_cleared_buffer [CPRINTF_BUFFER_SIZE] |
const char * | CPrintfMessages [] |
_ _ _ __| | ___(_) ____ _ __ | |_ / _` | / __| |/ _` | '_ \| __| | (_| | _ \__ \ | (_| | | | | |_ \__,_|(_) ___/_|\__, |_| |_|\__| Signalprocessing |___/ Technology
This module contains the custom printf implementation. Depending on available peripheral a formatted print is possible over UART, USB or network
Additional information for using printf: http://processors.wiki.ti.com/index.php/Tips_for_using_printf
#define INC_CPRINTF |
#define CP_FLAG_CLS 1 |
#define CP_FLAG_CLL 2 |
#define CP_FLAG_STDERR 4 |
#define CPRINTF_NO_ERROR CPrintfMessages[0] |
#define CPRINTF_SUCCESS CPrintfMessages[1] |
#define CPRINTF_ERROR CPrintfMessages[2] |
#define CPRINTF_SKIPPED CPrintfMessages[3] |
#define CPRINTF_NO_DEVICE CPrintfMessages[4] |
#define CPRINTF_BUFFER_OVERFLOW CPrintfMessages[5] |
void CPrintfActivateOutput | ( | void | ) |
- |
int CPuts | ( | const char * | _ptr | ) |
int CPrintf | ( | const char * | _format, |
... | |||
) |
_format | - format string |
void CPrintChar | ( | const char | symbol, |
size_t | count | ||
) |
symbol | - character to print |
count | - repeat count |
uint16_t CPrintAnimatedSymbol | ( | char * | c, |
time_t | period, | ||
size_t | size | ||
) |
int32_t CPrintProgressBar | ( | char | c, |
time_t | period, | ||
size_t | length | ||
) |
int32_t CPrintProgressBarText | ( | char | c, |
time_t | period, | ||
size_t | length, | ||
char * | text | ||
) |
uint16_t output_device = CPRINTF_NO_OUTPUT |
Used to select the CPrintf() outputs. Use defines
|
static |
uint16_t CPrintfFlags = 0 |
char CPrintf_raw_buffer[CPRINTF_BUFFER_SIZE] |
char CPrintf_cleared_buffer[CPRINTF_BUFFER_SIZE] |
const char* CPrintfMessages[] |