RTEMS  5.0.0
io.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2008.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_IO_H
20 #define _RTEMS_IO_H
21 
22 #include <rtems/rtems/status.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
36 typedef uint32_t rtems_device_major_number;
37 
38 typedef uint32_t rtems_device_minor_number;
39 
41 
42 typedef rtems_device_driver (*rtems_device_driver_entry)(
43  rtems_device_major_number,
44  rtems_device_minor_number,
45  void *
46 );
47 
48 typedef struct {
49  rtems_device_driver_entry initialization_entry;
50  rtems_device_driver_entry open_entry;
51  rtems_device_driver_entry close_entry;
52  rtems_device_driver_entry read_entry;
53  rtems_device_driver_entry write_entry;
54  rtems_device_driver_entry control_entry;
56 
68  rtems_device_major_number major,
69  rtems_device_minor_number minor,
70  void *arg
71 );
72 
93  rtems_device_major_number major,
94  const rtems_driver_address_table *driver_table,
95  rtems_device_major_number *registered_major
96 );
97 
108  rtems_device_major_number major
109 );
110 
121  const char *device_name,
122  rtems_device_major_number major,
123  rtems_device_minor_number minor
124 );
125 
140  rtems_device_major_number major,
141  rtems_device_minor_number minor,
142  void *argument
143 );
144 
157  rtems_device_major_number major,
158  rtems_device_minor_number minor,
159  void *argument
160 );
161 
174  rtems_device_major_number major,
175  rtems_device_minor_number minor,
176  void *argument
177 );
178 
191  rtems_device_major_number major,
192  rtems_device_minor_number minor,
193  void *argument
194 );
195 
208  rtems_device_major_number major,
209  rtems_device_minor_number minor,
210  void *argument
211 );
212 
225  rtems_device_major_number major,
226  rtems_device_minor_number minor,
227  void *argument
228 );
229 
234 typedef struct {
235  const char *device_name;
236  size_t device_name_length;
237  rtems_device_major_number major;
238  rtems_device_minor_number minor;
240 
245  const char *name,
246  rtems_driver_name_t *device_info
248 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #endif
254 /* end of include file */
rtems_status_code rtems_io_register_name(const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor)
Registers the name device_name in the file system for the device with number tuple major and minor...
Definition: ioman.c:29
Definition: io.h:234
rtems_status_code rtems_io_write(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Writing for the IO manager.
Definition: iowrite.c:24
Definition: io.h:48
rtems_status_code rtems_io_driver_io_error(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
Returns RTEMS_IO_ERROR.
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems_status_code rtems_io_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
IO driver initialization.
Definition: ioinitialize.c:24
rtems_status_code rtems_io_register_driver(rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major)
Registers and initializes the device with the device driver table driver_table and major number major...
Definition: ioregisterdriver.c:61
rtems_status_code rtems_io_control(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Control for the IO manager.
Definition: iocontrol.c:24
rtems_status_code rtems_io_lookup_name(const char *name, rtems_driver_name_t *device_info) RTEMS_DEPRECATED
Definition: ioman.c:48
rtems_status_code rtems_io_close(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Closing for the IO manager.
Definition: ioclose.c:26
rtems_status_code rtems_io_read(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Reading for the IO manager.
Definition: ioread.c:24
rtems_status_code rtems_io_unregister_driver(rtems_device_major_number major)
Unregister a driver from the device driver table.
Definition: iounregisterdriver.c:27
#define RTEMS_DEPRECATED
Public name for task floating point context area.
Definition: basedefs.h:129
rtems_status_code rtems_io_open(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Opening for the IO manager.
Definition: ioopen.c:26