5
Last change
on this file since 1c6926c1 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:
690 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Plugin Printk |
---|
5 | * @ingroup libcsupport |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2007. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <rtems/printer.h> |
---|
22 | #include <rtems/bspIo.h> |
---|
23 | |
---|
24 | static int printk_plugin( |
---|
25 | void *ignored, |
---|
26 | const char *format, |
---|
27 | va_list ap |
---|
28 | ) |
---|
29 | { |
---|
30 | (void) ignored; |
---|
31 | vprintk( format, ap ); |
---|
32 | return 0; |
---|
33 | } |
---|
34 | |
---|
35 | void rtems_print_printer_printk( |
---|
36 | rtems_printer *printer |
---|
37 | ) |
---|
38 | { |
---|
39 | printer->context = NULL; |
---|
40 | printer->printer = printk_plugin; |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.