source: rtems/cpukit/include/rtems/bspIo.h @ 9ab091e

4.11
Last change on this file since 9ab091e was 9ab091e, checked in by Mathew Kallada <matkallada@…>, on Dec 28, 2012 at 4:35:32 PM

Header File Doxygen Enhancement Task #2

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/**
2 * @file rtems/bspIo.h
3 *
4 * @brief Interface to Kernel Print Methods
5 *
6 * This include file defines the interface to kernel print methods.
7 */
8
9/*
10 *  COPYRIGHT (c) 1998 valette@crf.canon.fr
11 *  COPYRIGHT (c) 2011 On-Line Applications Research Corporation.
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.com/license/LICENSE.
16 */
17#ifndef _RTEMS_BSPIO_H
18#define _RTEMS_BSPIO_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/*
25 * All the functions declared as extern after this comment
26 * MUST be implemented in each BSP. Using this function,
27 * this directory contains shared code that export higher level
28 * functionnality described after the next command.
29 */
30typedef void    (*BSP_output_char_function_type)        (char c);
31typedef int     (*BSP_polling_getchar_function_type)    (void);
32
33extern  BSP_output_char_function_type           BSP_output_char;
34extern  BSP_polling_getchar_function_type       BSP_poll_char;
35
36/*
37 * All the function declared as extern after this comment
38 * are available for each BSP by compiling and linking
39 * the files contained in this directory PROVIDED definition
40 * and initialisation of the previous variable are done.
41 */
42#include <stdarg.h>
43
44/**
45 *  This method polls for a key in the simplest possible fashion
46 *  from whatever the debug console device is.
47 *
48 *  @return If a character is available, it is returned.  Otherwise
49 *          this method returns -1.
50 *
51 *  @note This method uses the BSP_poll_char pointer to a BSP
52 *        provided method.
53 */
54extern int getchark(void);
55extern void vprintk(const char *fmt, va_list ap);
56extern void printk(const char *fmt, ...);
57extern void putk(const char *s);
58extern void rtems_putc(char c);
59
60/*
61 *  This routine is passed into RTEMS reporting functions
62 *  that may have their output redirected.  In particular,
63 *  the cpu usage, period usage, and stack usage reporting
64 *  functions use this.  If the user provides their
65 *  own "printf plugin", then they may redirect those reports
66 *  as they see fit.
67 */
68extern int printk_plugin(void *context, const char *fmt, ...);
69
70extern int rtems_printf_plugin(void *context, const char *fmt, ...);
71
72/*
73 *  Type definition for function which can be plugged in to
74 *  certain reporting routines to redirect the output
75 */
76typedef int (*rtems_printk_plugin_t)(void *, const char *format, ...);
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif
Note: See TracBrowser for help on using the repository browser.