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