Embedded Artistry Framework
Embedded Systems C++ Framework
Classes | Typedefs | Functions
test Namespace Reference

Classes

class  i2cTestDriver
 I2C Master Unit Test Driver. More...
 
struct  out_fct_wrap_type
 
class  spiTestDriver
 SPI Master Unit Test Driver. More...
 
class  TestDriverBase
 Test driver that enables testing DriverBase. More...
 
class  UnitTestGPIOInput
 Unit Test GPIO Input Driver. More...
 
class  UnitTestGPIOInputWithPullup
 Unit Test GPIO Input Driver, with a pullup. More...
 

Typedefs

typedef __builtin_va_list va_list
 
typedef __builtin_va_list __isoc_va_list
 
typedef long ptrdiff_t
 
typedef unsigned long size_t
 
typedef long ssize_t
 
typedef _Bool bool
 Expands to _Bool. More...
 
typedef short int16_t
 
typedef int int32_t
 
typedef long long int64_t
 
typedef signed char int8_t
 
typedef unsigned short uint16_t
 
typedef unsigned int uint32_t
 
typedef unsigned long long uint64_t
 
typedef unsigned char uint8_t
 
typedef int8_t int_least8_t
 
typedef int16_t int_least16_t
 
typedef int32_t int_least32_t
 
typedef int64_t int_least64_t
 
typedef uint8_t uint_least8_t
 
typedef uint16_t uint_least16_t
 
typedef uint32_t uint_least32_t
 
typedef uint64_t uint_least64_t
 
typedef int8_t int_fast8_t
 
typedef int32_t int_fast16_t
 
typedef int32_t int_fast32_t
 
typedef int64_t int_fast64_t
 
typedef uint8_t uint_fast8_t
 
typedef uint32_t uint_fast16_t
 
typedef uint32_t uint_fast32_t
 
typedef uint64_t uint_fast64_t
 
typedef long intptr_t
 
typedef unsigned long uintptr_t
 
typedef long int intmax_t
 
typedef unsigned long long uintmax_t
 
typedef void(* out_fct_type) (char character, void *buffer, size_t idx, size_t maxlen)
 

Functions

void _putchar (char character)
 Output a character to a custom device like UART, used by the printf() function This function is declared here only. More...
 
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,...)
 printf with output function You may use this as dynamic alternative to printf() with its fixed _putchar() output More...
 
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 Documentation

◆ __isoc_va_list

typedef __builtin_va_list test::__isoc_va_list

◆ bool

typedef _Bool test::bool

Expands to _Bool.

◆ int16_t

typedef short test::int16_t

◆ int32_t

typedef int test::int32_t

◆ int64_t

typedef long long test::int64_t

◆ int8_t

typedef signed char test::int8_t

◆ int_fast16_t

fastest signed integer type with width of at least 16

◆ int_fast32_t

fastest signed integer type with width of at least 32

◆ int_fast64_t

fastest signed integer type with width of at least 64

◆ int_fast8_t

fastest signed integer type with width of at least 8

◆ int_least16_t

smallest signed integer type with width of at least 16

◆ int_least32_t

smallest signed integer type with width of at least 32

◆ int_least64_t

smallest signed integer type with width of at least 64

◆ int_least8_t

smallest signed integer type with width of at least 8

◆ intmax_t

typedef long int test::intmax_t

◆ intptr_t

typedef long test::intptr_t

◆ out_fct_type

typedef void(* test::out_fct_type) (char character, void *buffer, size_t idx, size_t maxlen)

◆ ptrdiff_t

typedef long test::ptrdiff_t

◆ size_t

typedef unsigned long test::size_t

◆ ssize_t

typedef long test::ssize_t

◆ uint16_t

typedef unsigned short test::uint16_t

◆ uint32_t

typedef unsigned int test::uint32_t

◆ uint64_t

typedef unsigned long long test::uint64_t

◆ uint8_t

typedef unsigned char test::uint8_t

◆ uint_fast16_t

fastest unsigned integer type with width of at least 16

◆ uint_fast32_t

fastest unsigned integer type with width of at least 32

◆ uint_fast64_t

fastest unsigned integer type with width of at least 64

◆ uint_fast8_t

fastest unsigned integer type with width of at least 8

◆ uint_least16_t

smallest unsigned integer type with width of at least 16

◆ uint_least32_t

smallest unsigned integer type with width of at least 32

◆ uint_least64_t

smallest unsigned integer type with width of at least 64

◆ uint_least8_t

smallest unsigned integer type with width of at least 8

◆ uintmax_t

typedef unsigned long long test::uintmax_t

◆ uintptr_t

typedef unsigned long test::uintptr_t

◆ va_list

typedef __builtin_va_list test::va_list

Function Documentation

◆ _atoi()

static unsigned int test::_atoi ( const char **  str)
static

◆ _etoa()

static size_t test::_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

◆ _ftoa()

static size_t test::_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

◆ _is_digit()

static bool test::_is_digit ( char  ch)
inlinestatic

◆ _ntoa_format()

static size_t test::_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

◆ _ntoa_long()

static size_t test::_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

◆ _ntoa_long_long()

static size_t test::_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

◆ _out_buffer()

static void test::_out_buffer ( char  character,
void *  buffer,
size_t  idx,
size_t  maxlen 
)
inlinestatic

◆ _out_char()

static void test::_out_char ( char  character,
void *  buffer,
size_t  idx,
size_t  maxlen 
)
inlinestatic

◆ _out_fct()

static void test::_out_fct ( char  character,
void *  buffer,
size_t  idx,
size_t  maxlen 
)
inlinestatic

◆ _out_null()

static void test::_out_null ( char  character,
void *  buffer,
size_t  idx,
size_t  maxlen 
)
inlinestatic

◆ _out_rev()

static size_t test::_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

◆ _putchar()

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

Parameters
characterCharacter to output

References write().

Referenced by _out_char(), embvm::CircularLogBufferLogger< TBufferSize, TLock >::dump(), and putchar().

Here is the caller graph for this function:

◆ _strnlen_s()

static unsigned int test::_strnlen_s ( const char *  str,
size_t  maxsize 
)
inlinestatic

◆ _vsnprintf()

static int test::_vsnprintf ( out_fct_type  out,
char *  buffer,
const size_t  maxlen,
const char *  format,
va_list  va 
)
static

◆ fctprintf()

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

Parameters
outAn output function which takes one character and an argument pointer
argAn argument pointer for user data passed to output function
formatA string that specifies the format of the output
Returns
The number of characters that are sent to the output function, not counting the terminating null character

References _out_fct(), _vsnprintf(), va_end, and va_start.

◆ printf_()

int test::printf_ ( const char *  format,
  ... 
)

◆ snprintf_()

int test::snprintf_ ( char *  buffer,
size_t  count,
const char *  format,
  ... 
)

◆ sprintf_()

int test::sprintf_ ( char *  buffer,
const char *  format,
  ... 
)

◆ vprintf_()

int test::vprintf_ ( const char *  format,
va_list  va 
)

References _out_char(), and _vsnprintf().

◆ vsnprintf_()

int test::vsnprintf_ ( char *  buffer,
size_t  count,
const char *  format,
va_list  va 
)

References _out_buffer(), and _vsnprintf().