#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <Delegate.h>
Go to the source code of this file.
|
| nputs_callback_t | m_setPuts (nputs_callback_t callback) |
| | set the character output routine More...
|
| |
| int | m_vsnprintf (char *buf, size_t maxLen, const char *fmt, va_list args) |
| |
| int | m_snprintf (char *buf, int length, const char *fmt,...) |
| |
| int | m_printf (char const *,...) |
| |
| int | m_vprintf (const char *format, va_list arg) |
| |
| size_t | m_putc (char c) |
| | output a single character More...
|
| |
| size_t | m_nputs (const char *str, size_t length) |
| | output a text string More...
|
| |
| static size_t | m_puts (const char *str) |
| |
| template<typename... Args> |
| int | snprintf (char *buf, int length, const char *fmt, Args... args) |
| |
| template<typename... Args> |
| int | printf (const char *fmt, Args... args) |
| |
| void | m_printHex (const char *tag, const void *data, size_t len, int addr=-1, size_t bytesPerLine=16) |
| | output a block of data in hex format More...
|
| |
◆ nputs_callback_t
callback type to output a string of data
- Parameters
-
| param | |
| str | data to send |
| length | number of characters to write |
- Return values
-
| number | of characters written, which may be less than the requested size |
- Note
- data does not need to be nul terminated and may contain any 8-bit values including nul
◆ m_nputs()
| size_t m_nputs |
( |
const char * |
str, |
|
|
size_t |
length |
|
) |
| |
output a text string
- Parameters
-
| str | the text |
| length | length of text, excluding nul terminator |
- Return values
-
| size_t | number of characters actually output |
- Note
- nul terminator is optional
◆ m_printf()
| int m_printf |
( |
char const * |
, |
|
|
|
... |
|
) |
| |
◆ m_printHex()
| void m_printHex |
( |
const char * |
tag, |
|
|
const void * |
data, |
|
|
size_t |
len, |
|
|
int |
addr = -1, |
|
|
size_t |
bytesPerLine = 16 |
|
) |
| |
output a block of data in hex format
- Parameters
-
| tag | brief name to display with the data block. Specify nullptr if not required. |
| data | |
| len | |
| addr | Prefix lines with addresses starting at the given value, use -1 if not required. |
| bytesPerLine | If non-zero, data will be output in block separated by carriage return |
- Note
- intended for debugging
◆ m_putc()
output a single character
- Parameters
-
- Return values
-
| size_t | 1 on success, 0 if the character could not be output |
◆ m_puts()
| static size_t m_puts |
( |
const char * |
str | ) |
|
|
inlinestatic |
◆ m_setPuts()
set the character output routine
- Parameters
-
- Return values
-
| nputs_callback_t | The existing callback |
◆ m_snprintf()
| int m_snprintf |
( |
char * |
buf, |
|
|
int |
length, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ m_vprintf()
| int m_vprintf |
( |
const char * |
format, |
|
|
va_list |
arg |
|
) |
| |
◆ m_vsnprintf()
| int m_vsnprintf |
( |
char * |
buf, |
|
|
size_t |
maxLen, |
|
|
const char * |
fmt, |
|
|
va_list |
args |
|
) |
| |
◆ printf()
template<typename... Args>
| int printf |
( |
const char * |
fmt, |
|
|
Args... |
args |
|
) |
| |
◆ snprintf()
template<typename... Args>
| int snprintf |
( |
char * |
buf, |
|
|
int |
length, |
|
|
const char * |
fmt, |
|
|
Args... |
args |
|
) |
| |