From 1bc0ad2e12e9e523a9b9043ac47254a0597826bf Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 8 Sep 2017 10:38:46 +0200 Subject: Simplify and unify BSP_output_char The BSP_output_char should output a char and not mingle with high level processing, e.g. '\n' to '\r\n' translation. Move this translation to rtems_putc(). Remove it from all the BSP_output_char implementations. Close #3122. --- cpukit/include/rtems/bspIo.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpukit/include/rtems/bspIo.h') diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h index d0d8f83dcd..8ab46afecd 100644 --- a/cpukit/include/rtems/bspIo.h +++ b/cpukit/include/rtems/bspIo.h @@ -55,6 +55,9 @@ typedef int (*BSP_polling_getchar_function_type) (void); /** * This variable points to the BSP provided method to output a * character for the purposes of debug output. + * + * It must output only the specific character. It must not perform character + * translations, e.g. "\n" to "\r\n". */ extern BSP_output_char_function_type BSP_output_char; @@ -94,7 +97,8 @@ extern int vprintk(const char *fmt, va_list ap); /** * @brief Kernel Print * - * This method allows the user to perform a debug printk(). + * This method allows the user to perform a debug printk(). It performs a + * character translation from "\n" to "\r\n". * * @param[in] fmt is a printf()-style format string * @@ -116,7 +120,8 @@ extern int putk(const char *s); /** * @brief Kernel Put Character * - * This method allows the user to perform a debug putc(). + * This method allows the user to perform a debug putc(). It performs a + * character translation from "\n" to "\r\n". * * @param[in] c is the character to print */ -- cgit v1.2.3