FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | out_fct_wrap_type |
Typedefs | |
typedef void(* | out_fct_type )(char character, void *buffer, size_t idx, size_t maxlen) |
Functions | |
void | __io_lock () |
void | __io_unlock () |
void | _putchar (char character) |
int | printf_ (const char *format,...) |
int | sprintf_ (char *buffer, const char *format,...) |
int | snprintf_ (char *buffer, size_t count, const char *format,...) |
int | vsnprintf_ (char *buffer, size_t count, const char *format, va_list va) |
int | vprintf_ (const char *format, va_list va) |
int | fctprintf (void(*out)(char character, void *arg), void *arg, const char *format,...) |
static void | _out_buffer (char character, void *buffer, size_t idx, size_t maxlen) |
static void | _out_null (char character, void *buffer, size_t idx, size_t maxlen) |
static void | _out_char (char character, void *buffer, size_t idx, size_t maxlen) |
static void | _out_fct (char character, void *buffer, size_t idx, size_t maxlen) |
static unsigned int | _strnlen_s (const char *str, size_t maxsize) |
static bool | _is_digit (char ch) |
static unsigned int | _atoi (const char **str) |
static size_t | _out_rev (out_fct_type out, char *buffer, size_t idx, size_t maxlen, const char *buf, size_t len, unsigned int width, unsigned int flags) |
static size_t | _ntoa_format (out_fct_type out, char *buffer, size_t idx, size_t maxlen, char *buf, size_t len, bool negative, unsigned int base, unsigned int prec, unsigned int width, unsigned int flags) |
static size_t | _ntoa_long (out_fct_type out, char *buffer, size_t idx, size_t maxlen, unsigned long value, bool negative, unsigned long base, unsigned int prec, unsigned int width, unsigned int flags) |
static size_t | _ntoa_long_long (out_fct_type out, char *buffer, size_t idx, size_t maxlen, unsigned long long value, bool negative, unsigned long long base, unsigned int prec, unsigned int width, unsigned int flags) |
static size_t | _etoa (out_fct_type out, char *buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags) |
static size_t | _ftoa (out_fct_type out, char *buffer, size_t idx, size_t maxlen, double value, unsigned int prec, unsigned int width, unsigned int flags) |
static int | _vsnprintf (out_fct_type out, char *buffer, const size_t maxlen, const char *format, va_list va) |
typedef void(* test::out_fct_type)(char character, void *buffer, size_t idx, size_t maxlen) |
void test::__io_lock | ( | ) |
Lock the printf to avoid collision when multiple threads/cores try to output strings/characters. This function can implement a mutex, semaphore or whatever lock.
void test::__io_unlock | ( | ) |
Unlock the printf, release the lock, semaphore or mutex used to lock printf. This function releases the mutex, semaphore or whatever lock used previously.
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
void test::_putchar | ( | char | character | ) |
Output a character to a custom device like UART, used by the printf() function This function is declared here only. You have to write your custom implementation somewhere
character | Character to output |
References printf_buffer, printf_idx, and tfp_putc().
Referenced by _out_char().
|
inlinestatic |
|
static |
int test::fctprintf | ( | void(*)(char character, void *arg) | out, |
void * | arg, | ||
const char * | format, | ||
... | |||
) |
printf with output function You may use this as dynamic alternative to printf() with its fixed _putchar() output
out | An output function which takes one character and an argument pointer |
arg | An argument pointer for user data passed to output function |
format | A string that specifies the format of the output |
References _out_fct(), and _vsnprintf().
Referenced by TEST_CASE().
int test::printf_ | ( | const char * | format, |
... | |||
) |
References __io_lock(), __io_unlock(), _out_char(), and _vsnprintf().
int test::snprintf_ | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
... | |||
) |
References _out_buffer(), and _vsnprintf().
int test::sprintf_ | ( | char * | buffer, |
const char * | format, | ||
... | |||
) |
References _out_buffer(), and _vsnprintf().
int test::vprintf_ | ( | const char * | format, |
va_list | va | ||
) |
References _out_char(), and _vsnprintf().
int test::vsnprintf_ | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
va_list | va | ||
) |
References _out_buffer(), and _vsnprintf().