source: rtems/cpukit/include/rtems/print.h @ 21275b58

5
Last change on this file since 21275b58 was 506bfc8, checked in by Sebastian Huber <sebastian.huber@…>, on 06/21/16 at 11:30:15

Move printer initialization to separate header

The RTEMS print user need to know nothing about a particular printer
implementation. In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file rtems/print.h
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
26extern "C" {
27#endif
28
29typedef struct rtems_printer rtems_printer;
30
31/**
32 * @defgroup RTEMSPrintSupport RTEMS Print Support
33 *
34 * This module contains all methods and support related to providing the user
35 * with an interface to the kernel level print support.
36 */
37
38/**
39 * @brief Print to the kernel plugin handler. This has to be a macro because
40 * there is no vprint version of the plug in handlers.
41 *
42 * @param[in] printer Pointer to the printer structure.
43 * @param[in] fmt Print format string.
44 * @param[in] ... Print variable argument list.
45 *
46 * @return int Number of characters printed.
47 */
48extern int rtems_printf(const rtems_printer *printer,
49                        const char          *format,
50                        ...) RTEMS_PRINTFLIKE(2, 3);
51
52/**
53 * @brief Print to the kernel plugin handler. This has to be a macro because
54 * there is no vprint version of the plug in handlers.
55 *
56 * @param[in] printer Pointer to the printer structure.
57 * @param[in] fmt Print format string.
58 * @param[in] ap Print variable argument list pointer.
59 *
60 * @return int Number of characters printed.
61 */
62extern int rtems_vprintf(const rtems_printer *printer,
63                         const char          *format,
64                         va_list              ap);
65
66/** @} */
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* _RTEMS_PRINT_H */
Note: See TracBrowser for help on using the repository browser.