1 | /** |
---|
2 | * @file rtems/console.h |
---|
3 | */ |
---|
4 | |
---|
5 | /* console.h |
---|
6 | * |
---|
7 | * This file describes the Console Device Driver for all boards. |
---|
8 | * This driver provides support for the standard C Library. |
---|
9 | * |
---|
10 | * COPYRIGHT (c) 1989-1999. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
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 | * $Id$ |
---|
18 | */ |
---|
19 | |
---|
20 | #ifndef _RTEMS_CONSOLE_H |
---|
21 | #define _RTEMS_CONSOLE_H |
---|
22 | |
---|
23 | #include <rtems/io.h> /* rtems_device_driver */ |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" { |
---|
27 | #endif |
---|
28 | |
---|
29 | /** |
---|
30 | * This macro defines the standard name for the console device |
---|
31 | * that is available to applications. |
---|
32 | */ |
---|
33 | #define CONSOLE_DEVICE_NAME "/dev/console" |
---|
34 | |
---|
35 | /** |
---|
36 | * This macro defines the standard device driver table entry for |
---|
37 | * a console device driver. |
---|
38 | */ |
---|
39 | #define CONSOLE_DRIVER_TABLE_ENTRY \ |
---|
40 | { console_initialize, console_open, console_close, \ |
---|
41 | console_read, console_write, console_control } |
---|
42 | |
---|
43 | /** |
---|
44 | * @brief Console Initialization Entry Point |
---|
45 | * |
---|
46 | * This method initializes the console device driver. |
---|
47 | * |
---|
48 | * @param[in] major is the device driver major number |
---|
49 | * @param[in] minor is the device driver minor number |
---|
50 | * @param[in] arg is the parameters to this call |
---|
51 | * |
---|
52 | * @return This method returns RTEMS_SUCCESSFUL when |
---|
53 | * the device driver is successfully initialized. |
---|
54 | */ |
---|
55 | rtems_device_driver console_initialize( |
---|
56 | rtems_device_major_number major, |
---|
57 | rtems_device_minor_number minor, |
---|
58 | void *arg |
---|
59 | ); |
---|
60 | |
---|
61 | /** |
---|
62 | * @brief Console Open Entry Point |
---|
63 | * |
---|
64 | * This method opens a specific device supported by the |
---|
65 | * console device driver. |
---|
66 | * |
---|
67 | * @param[in] major is the device driver major number |
---|
68 | * @param[in] minor is the device driver minor number |
---|
69 | * @param[in] arg is the parameters to this call |
---|
70 | * |
---|
71 | * @return This method returns RTEMS_SUCCESSFUL when |
---|
72 | * the device driver is successfully opened. |
---|
73 | */ |
---|
74 | rtems_device_driver console_open( |
---|
75 | rtems_device_major_number major, |
---|
76 | rtems_device_minor_number minor, |
---|
77 | void *arg |
---|
78 | ); |
---|
79 | |
---|
80 | /** |
---|
81 | * @brief Console Close Entry Point |
---|
82 | * |
---|
83 | * This method closes a specific device supported by the |
---|
84 | * console device driver. |
---|
85 | * |
---|
86 | * @param[in] major is the device driver major number |
---|
87 | * @param[in] minor is the device driver minor number |
---|
88 | * @param[in] arg is the parameters to this call |
---|
89 | * |
---|
90 | * @return This method returns RTEMS_SUCCESSFUL when |
---|
91 | * the device is successfully closed. |
---|
92 | */ |
---|
93 | rtems_device_driver console_close( |
---|
94 | rtems_device_major_number major, |
---|
95 | rtems_device_minor_number minor, |
---|
96 | void *arg |
---|
97 | ); |
---|
98 | |
---|
99 | /** |
---|
100 | * @brief Console Read Entry Point |
---|
101 | * |
---|
102 | * This method reads from a specific device supported by the |
---|
103 | * console device driver. |
---|
104 | * |
---|
105 | * @param[in] major is the device driver major number |
---|
106 | * @param[in] minor is the device driver minor number |
---|
107 | * @param[in] arg is the parameters to this call |
---|
108 | * |
---|
109 | * @return This method returns RTEMS_SUCCESSFUL when |
---|
110 | * the device is successfully read from. |
---|
111 | */ |
---|
112 | rtems_device_driver console_read( |
---|
113 | rtems_device_major_number major, |
---|
114 | rtems_device_minor_number minor, |
---|
115 | void *arg |
---|
116 | ); |
---|
117 | |
---|
118 | /** |
---|
119 | * @brief Console Write Entry Point |
---|
120 | * |
---|
121 | * This method writes to a specific device supported by the |
---|
122 | * console device driver. |
---|
123 | * |
---|
124 | * @param[in] major is the device driver major number |
---|
125 | * @param[in] minor is the device driver minor number |
---|
126 | * @param[in] arg is the parameters to this call |
---|
127 | * |
---|
128 | * @return This method returns RTEMS_SUCCESSFUL when |
---|
129 | * the device is successfully written. |
---|
130 | */ |
---|
131 | rtems_device_driver console_write( |
---|
132 | rtems_device_major_number major, |
---|
133 | rtems_device_minor_number minor, |
---|
134 | void *arg |
---|
135 | ); |
---|
136 | |
---|
137 | /** |
---|
138 | * @brief Console IO Control Entry Point |
---|
139 | * |
---|
140 | * This method performs an IO Control operation on a |
---|
141 | * specific device supported by the console device driver. |
---|
142 | * |
---|
143 | * @param[in] major is the device driver major number |
---|
144 | * @param[in] minor is the device driver minor number |
---|
145 | * @param[in] arg is the parameters to this call |
---|
146 | * |
---|
147 | * @return This method returns RTEMS_SUCCESSFUL when |
---|
148 | * the device driver IO control operation is |
---|
149 | * successfully performed. |
---|
150 | */ |
---|
151 | rtems_device_driver console_control( |
---|
152 | rtems_device_major_number major, |
---|
153 | rtems_device_minor_number minor, |
---|
154 | void *arg |
---|
155 | ); |
---|
156 | |
---|
157 | #ifdef __cplusplus |
---|
158 | } |
---|
159 | #endif |
---|
160 | |
---|
161 | #endif |
---|
162 | /* end of include file */ |
---|