aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/lib/streams
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-11-09 09:08:18 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-11-09 09:08:18 +0000
commitfd96d460ff3a978a7f63b33963b894698412e8e5 (patch)
treede3b56e530776a6d8e8b43e5eb120d4cc8f63b69 /os/hal/lib/streams
parentaf8938572a826e089d8dfe5dafe956870b05c7ea (diff)
downloadChibiOS-fd96d460ff3a978a7f63b33963b894698412e8e5.tar.gz
ChibiOS-fd96d460ff3a978a7f63b33963b894698412e8e5.tar.bz2
ChibiOS-fd96d460ff3a978a7f63b33963b894698412e8e5.zip
De-inlined chprintf().
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8454 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/lib/streams')
-rw-r--r--os/hal/lib/streams/chprintf.c34
-rw-r--r--os/hal/lib/streams/chprintf.h35
2 files changed, 35 insertions, 34 deletions
diff --git a/os/hal/lib/streams/chprintf.c b/os/hal/lib/streams/chprintf.c
index 5f4ae4f87..fa2b105a4 100644
--- a/os/hal/lib/streams/chprintf.c
+++ b/os/hal/lib/streams/chprintf.c
@@ -278,6 +278,40 @@ unsigned_common:
/**
* @brief System formatted output function.
+ * @details This function implements a minimal @p printf() like functionality
+ * with output on a @p BaseSequentialStream.
+ * The general parameters format is: %[-][width|*][.precision|*][l|L]p.
+ * The following parameter types (p) are supported:
+ * - <b>x</b> hexadecimal integer.
+ * - <b>X</b> hexadecimal long.
+ * - <b>o</b> octal integer.
+ * - <b>O</b> octal long.
+ * - <b>d</b> decimal signed integer.
+ * - <b>D</b> decimal signed long.
+ * - <b>u</b> decimal unsigned integer.
+ * - <b>U</b> decimal unsigned long.
+ * - <b>c</b> character.
+ * - <b>s</b> string.
+ * .
+ *
+ * @param[in] chp pointer to a @p BaseSequentialStream implementing object
+ * @param[in] fmt formatting string
+ *
+ * @api
+ */
+int chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
+ va_list ap;
+ int formatted_bytes;
+
+ va_start(ap, fmt);
+ formatted_bytes = chvprintf(chp, fmt, ap);
+ va_end(ap);
+
+ return formatted_bytes;
+}
+
+/**
+ * @brief System formatted output function.
* @details This function implements a minimal @p vprintf()-like functionality
* with output on a @p BaseSequentialStream.
* The general parameters format is: %[-][width|*][.precision|*][l|L]p.
diff --git a/os/hal/lib/streams/chprintf.h b/os/hal/lib/streams/chprintf.h
index 030640aa5..98a00e357 100644
--- a/os/hal/lib/streams/chprintf.h
+++ b/os/hal/lib/streams/chprintf.h
@@ -38,45 +38,12 @@
extern "C" {
#endif
int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap);
+ int chprintf(BaseSequentialStream *chp, const char *fmt, ...);
int chsnprintf(char *str, size_t size, const char *fmt, ...);
#ifdef __cplusplus
}
#endif
-/**
- * @brief System formatted output function.
- * @details This function implements a minimal @p printf() like functionality
- * with output on a @p BaseSequentialStream.
- * The general parameters format is: %[-][width|*][.precision|*][l|L]p.
- * The following parameter types (p) are supported:
- * - <b>x</b> hexadecimal integer.
- * - <b>X</b> hexadecimal long.
- * - <b>o</b> octal integer.
- * - <b>O</b> octal long.
- * - <b>d</b> decimal signed integer.
- * - <b>D</b> decimal signed long.
- * - <b>u</b> decimal unsigned integer.
- * - <b>U</b> decimal unsigned long.
- * - <b>c</b> character.
- * - <b>s</b> string.
- * .
- *
- * @param[in] chp pointer to a @p BaseSequentialStream implementing object
- * @param[in] fmt formatting string
- *
- * @api
- */
-static inline int chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
- va_list ap;
- int formatted_bytes;
-
- va_start(ap, fmt);
- formatted_bytes = chvprintf(chp, fmt, ap);
- va_end(ap);
-
- return formatted_bytes;
-}
-
#endif /* _CHPRINTF_H_ */
/** @} */