Commit d6ad2617 authored by Federico Vaga's avatar Federico Vaga

rt: reorder function for better doxygen

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent de8ffcae
......@@ -17,73 +17,75 @@
#include <stdarg.h>
/**
* Include this code only if explicitly asked to
*/
#ifdef LIB_PRINTF
#define CONFIG_PRINT_BUFSIZE 128
extern int pp_printf(const char *fmt, ...)
__attribute__((format(printf,1,2)));
extern int pp_sprintf(char *s, const char *fmt, ...)
__attribute__((format(printf,2,3)));
extern int pp_vprintf(const char *fmt, va_list args);
extern int pp_vsprintf(char *buf, const char *, va_list args)
__attribute__ ((format (printf, 2, 0)));
#else
/**
* It prints a string on the serial interface
* It prints a string on the serial interface.
* Internally, it uses the puts() function.
* @param[in] fmt string format
* @return number of printed characters
*/
#ifdef LIB_PRINTF
extern int pp_printf(const char *fmt, ...)
__attribute__((format(printf,1,2)));
#else
static inline int pp_printf(const char *fmt, ...)
{
return 0;
}
#endif
/**
* It fills a buffer with a string
* It creates a new string according to the given format
* @param[out] s output string
* @param[in] fmt string format
* @return number of printed characters
*/
#ifdef LIB_PRINTF
extern int pp_sprintf(char *s, const char *fmt, ...)
__attribute__((format(printf,2,3)));
#else
static inline int pp_sprintf(char *s, const char *fmt, ...)
{
return 0;
}
#endif
/**
* It prints a string on the serial interface
* It prints a string on the serial interface.
* Internally, it uses the puts() function.
* @param[in] fmt string format
* @param[in] args list of arguments according to the string format
* @return number of printed characters
*/
#ifdef LIB_PRINTF
extern int pp_vprintf(const char *fmt, va_list args);
#else
static inline int pp_vprintf(const char *fmt, va_list args)
{
return 0;
}
#endif
/**
* It fills a buffer with a string
* It creates a new string according to the given format
* @param[out] s output string
* @param[in] fmt string format
* @param[in] args list of arguments according to the string format
* @return number of printed characters
*/
#ifdef LIB_PRINTF
extern int pp_vsprintf(char *buf, const char *, va_list args)
__attribute__ ((format (printf, 2, 0)));
#else
static inline int pp_vsprintf(char *buf, const char *fmt, va_list args)
{
return 0;
}
#endif
/**@}*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment