Skip to content

Commit

Permalink
Add lwprintf for fast print
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Sep 26, 2020
1 parent 521f76c commit fe8a449
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lwprintf/src/include/lwprintf/lwprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ int lwprintf_snprintf_ex(lwprintf_t* const lw, char* s, size_t n, const
*/
#define lwprintf_printf(format, ...) lwprintf_printf_ex(NULL, (format), ## __VA_ARGS__)

/**
* \copydoc lwprintf_printf
* \note This function is equivalent to \ref lwprintf_printf
*/
#define lwprintf lwprintf_printf

/**
* \brief Write formatted data from variable argument list to sized buffer at default LwPRINTF instance
* \param[in] s: Pointer to a buffer where the resulting C-string is stored.
Expand Down
2 changes: 1 addition & 1 deletion lwprintf/src/lwprintf/lwprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ prv_format(lwprintf_int_t* p, va_list arg) {
case 'g':
case 'G':
#endif /* LWPRINTF_CFG_SUPPORT_TYPE_ENGINEERING */
/* Double number in different format. Final format depends on type of format */
/* Double number in different format. Final output depends on type of format */
prv_double_to_str(p, (double)va_arg(arg, double));
break;
#endif /* LWPRINTF_CFG_SUPPORT_TYPE_FLOAT */
Expand Down

0 comments on commit fe8a449

Please sign in to comment.