RTEMS CPU Kit with SuperCore  4.10.99.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 #ifndef SAPI_IO_EXTERN
23 #define SAPI_IO_EXTERN extern
24 #endif
25 
26 #include <rtems/rtems/status.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
40 typedef uint32_t rtems_device_major_number;
41 
42 typedef uint32_t rtems_device_minor_number;
43 
45 
46 typedef rtems_device_driver (*rtems_device_driver_entry)(
47  rtems_device_major_number,
48  rtems_device_minor_number,
49  void *
50 );
51 
52 typedef struct {
53  rtems_device_driver_entry initialization_entry;
54  rtems_device_driver_entry open_entry;
55  rtems_device_driver_entry close_entry;
56  rtems_device_driver_entry read_entry;
57  rtems_device_driver_entry write_entry;
58  rtems_device_driver_entry control_entry;
60 
72  rtems_device_major_number major,
73  rtems_device_minor_number minor,
74  void *arg
75 );
76 
97  rtems_device_major_number major,
98  const rtems_driver_address_table *driver_table,
99  rtems_device_major_number *registered_major
100 );
101 
112  rtems_device_major_number major
113 );
114 
125  const char *device_name,
126  rtems_device_major_number major,
127  rtems_device_minor_number minor
128 );
129 
144  rtems_device_major_number major,
145  rtems_device_minor_number minor,
146  void *argument
147 );
148 
161  rtems_device_major_number major,
162  rtems_device_minor_number minor,
163  void *argument
164 );
165 
178  rtems_device_major_number major,
179  rtems_device_minor_number minor,
180  void *argument
181 );
182 
195  rtems_device_major_number major,
196  rtems_device_minor_number minor,
197  void *argument
198 );
199 
212  rtems_device_major_number major,
213  rtems_device_minor_number minor,
214  void *argument
215 );
216 
229  rtems_device_major_number major,
230  rtems_device_minor_number minor,
231  void *argument
232 );
233 
238 typedef struct {
239  const char *device_name;
240  size_t device_name_length;
241  rtems_device_major_number major;
242  rtems_device_minor_number minor;
244 
249  const char *name,
250  rtems_driver_name_t *device_info
252 
253 extern const size_t _IO_Number_of_drivers;
254 
255 extern rtems_driver_address_table _IO_Driver_address_table[];
256 
262 void _IO_Initialize_all_drivers( void );
263 
264 #ifdef __cplusplus
265 }
266 #endif
267 
268 #endif
269 /* 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: io.h:238
rtems_status_code rtems_io_write(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Writing for the IO manager.
Definition: io.h:52
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:46
rtems_status_code rtems_io_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
IO driver initialization.
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...
rtems_status_code rtems_io_control(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Control for the IO manager.
rtems_status_code rtems_io_lookup_name(const char *name, rtems_driver_name_t *device_info)
#define RTEMS_COMPILER_DEPRECATED_ATTRIBUTE
Instructs the compiler to issue a warning whenever a variable or function with this attribute will be...
Definition: basedefs.h:186
rtems_status_code rtems_io_close(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Closing for the IO manager.
rtems_status_code rtems_io_read(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Reading for the IO manager.
void _IO_Initialize_all_drivers(void)
Initialization of all device drivers.
rtems_status_code rtems_io_unregister_driver(rtems_device_major_number major)
Unregister a driver from the device driver table.
rtems_status_code rtems_io_open(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Opening for the IO manager.