1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief User print interface to the bspIO print plug in. |
---|
5 | * |
---|
6 | * This include file defines the user interface to kernel print methods. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2016 Chris Johns <chrisj@rtems.org> |
---|
11 | * All rights reserved. |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #ifndef _RTEMS_PRINT_H |
---|
19 | #define _RTEMS_PRINT_H |
---|
20 | |
---|
21 | #include <rtems/score/basedefs.h> |
---|
22 | |
---|
23 | #include <stdarg.h> |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif |
---|
28 | |
---|
29 | typedef struct rtems_printer rtems_printer; |
---|
30 | |
---|
31 | /** |
---|
32 | * @defgroup RTEMSPrintSupport RTEMS Print Support |
---|
33 | * |
---|
34 | * @ingroup LibIO |
---|
35 | * |
---|
36 | * This module contains all methods and support related to providing the user |
---|
37 | * with an interface to the kernel level print support. |
---|
38 | */ |
---|
39 | |
---|
40 | /** |
---|
41 | * @brief Print to the kernel plugin handler. This has to be a macro because |
---|
42 | * there is no vprint version of the plug in handlers. |
---|
43 | * |
---|
44 | * @param[in] printer Pointer to the printer structure. |
---|
45 | * @param[in] fmt Print format string. |
---|
46 | * @param[in] ... Print variable argument list. |
---|
47 | * |
---|
48 | * @return int Number of characters printed. |
---|
49 | */ |
---|
50 | extern int rtems_printf(const rtems_printer *printer, |
---|
51 | const char *format, |
---|
52 | ...) RTEMS_PRINTFLIKE(2, 3); |
---|
53 | |
---|
54 | /** |
---|
55 | * @brief Print to the kernel plugin handler. This has to be a macro because |
---|
56 | * there is no vprint version of the plug in handlers. |
---|
57 | * |
---|
58 | * @param[in] printer Pointer to the printer structure. |
---|
59 | * @param[in] fmt Print format string. |
---|
60 | * @param[in] ap Print variable argument list pointer. |
---|
61 | * |
---|
62 | * @return int Number of characters printed. |
---|
63 | */ |
---|
64 | extern int rtems_vprintf(const rtems_printer *printer, |
---|
65 | const char *format, |
---|
66 | va_list ap); |
---|
67 | |
---|
68 | /** @} */ |
---|
69 | |
---|
70 | #ifdef __cplusplus |
---|
71 | } |
---|
72 | #endif |
---|
73 | |
---|
74 | #endif /* _RTEMS_PRINT_H */ |
---|