Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
print_full.h File Reference
#include <stdarg.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "bsp.h"
#include "soc.h"

Go to the source code of this file.

Data Structures

struct  out_fct_wrap_type

Macros

#define bsp_printf_full   printf_
#define bsp_sprintf_full   sprintf_
#define bsp_snprintf_full   snprintf_
#define bsp_efx_vsnprintf_full   vsnprintf_
#define bsp_vprintf_full   vprintf_
#define bsp_fctprintf_full   fctprintf
#define PRINTF_SUPPORT_LONG_LONG
#define FLAGS_ZEROPAD   (1U << 0U)
#define FLAGS_LEFT   (1U << 1U)
#define FLAGS_PLUS   (1U << 2U)
#define FLAGS_SPACE   (1U << 3U)
#define FLAGS_HASH   (1U << 4U)
#define FLAGS_UPPERCASE   (1U << 5U)
#define FLAGS_CHAR   (1U << 6U)
#define FLAGS_SHORT   (1U << 7U)
#define FLAGS_LONG   (1U << 8U)
#define FLAGS_LONG_LONG   (1U << 9U)
#define FLAGS_PRECISION   (1U << 10U)
#define FLAGS_ADAPT_EXP   (1U << 11U)

Typedefs

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

Macro Definition Documentation

◆ bsp_efx_vsnprintf_full

#define bsp_efx_vsnprintf_full   vsnprintf_

Definition at line 125 of file print_full.h.

◆ bsp_fctprintf_full

#define bsp_fctprintf_full   fctprintf

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

Definition at line 148 of file print_full.h.

◆ bsp_printf_full

#define bsp_printf_full   printf_

Tiny printf implementation You have to implement putchar if you use printf() To avoid conflicts with the regular printf() API it is overridden by macro defines and internal underscore-appended functions like printf() are used

Parameters
formatA string that specifies the format of the output
Returns
The number of characters that are written into the array, not counting the terminating null character

Definition at line 99 of file print_full.h.

◆ bsp_snprintf_full

#define bsp_snprintf_full   snprintf_

Tiny snprintf/vsnprintf implementation

Parameters
bufferA pointer to the buffer where to store the formatted string
countThe maximum number of characters to store in the buffer, including a terminating null character
formatA string that specifies the format of the output
vaA value identifying a variable arguments list
Returns
The number of characters that COULD have been written into the buffer, not counting the terminating null character. A value equal or larger than count indicates truncation. Only when the returned value is non-negative and less than count, the string has been completely written.

Definition at line 124 of file print_full.h.

◆ bsp_sprintf_full

#define bsp_sprintf_full   sprintf_

Tiny sprintf implementation Due to security reasons (buffer overflow) YOU SHOULD CONSIDER USING (V)SNPRINTF INSTEAD!

Parameters
bufferA pointer to the buffer where to store the formatted string. MUST be big enough to store the output!
formatA string that specifies the format of the output
Returns
The number of characters that are WRITTEN into the buffer, not counting the terminating null character

Definition at line 110 of file print_full.h.

◆ bsp_vprintf_full

#define bsp_vprintf_full   vprintf_

Tiny vprintf implementation

Parameters
formatA string that specifies the format of the output
vaA value identifying a variable arguments list
Returns
The number of characters that are WRITTEN into the buffer, not counting the terminating null character

Definition at line 136 of file print_full.h.

◆ FLAGS_ADAPT_EXP

#define FLAGS_ADAPT_EXP   (1U << 11U)

Definition at line 230 of file print_full.h.

◆ FLAGS_CHAR

#define FLAGS_CHAR   (1U << 6U)

Definition at line 225 of file print_full.h.

◆ FLAGS_HASH

#define FLAGS_HASH   (1U << 4U)

Definition at line 223 of file print_full.h.

◆ FLAGS_LEFT

#define FLAGS_LEFT   (1U << 1U)

Definition at line 220 of file print_full.h.

◆ FLAGS_LONG

#define FLAGS_LONG   (1U << 8U)

Definition at line 227 of file print_full.h.

◆ FLAGS_LONG_LONG

#define FLAGS_LONG_LONG   (1U << 9U)

Definition at line 228 of file print_full.h.

◆ FLAGS_PLUS

#define FLAGS_PLUS   (1U << 2U)

Definition at line 221 of file print_full.h.

◆ FLAGS_PRECISION

#define FLAGS_PRECISION   (1U << 10U)

Definition at line 229 of file print_full.h.

◆ FLAGS_SHORT

#define FLAGS_SHORT   (1U << 7U)

Definition at line 226 of file print_full.h.

◆ FLAGS_SPACE

#define FLAGS_SPACE   (1U << 3U)

Definition at line 222 of file print_full.h.

◆ FLAGS_UPPERCASE

#define FLAGS_UPPERCASE   (1U << 5U)

Definition at line 224 of file print_full.h.

◆ FLAGS_ZEROPAD

#define FLAGS_ZEROPAD   (1U << 0U)

Definition at line 219 of file print_full.h.

◆ PRINTF_SUPPORT_LONG_LONG

#define PRINTF_SUPPORT_LONG_LONG

Definition at line 201 of file print_full.h.

Typedef Documentation

◆ out_fct_type

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

Definition at line 239 of file print_full.h.