RTEMS: cpukit/include/rtems/io.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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
25extern "C" {
26#endif
27
36typedef uint32_t rtems_device_major_number;
37
38typedef uint32_t rtems_device_minor_number;
39
40typedef rtems_status_code rtems_device_driver;
41
42typedef 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;
55} rtems_driver_address_table;
56
67 rtems_status_code rtems_io_driver_io_error(
68 rtems_device_major_number major,
69 rtems_device_minor_number minor,
70 void *arg
71);
72
92 rtems_status_code rtems_io_register_driver(
93 rtems_device_major_number major,
94 const rtems_driver_address_table *driver_table,
95 rtems_device_major_number *registered_major
96);
97
107 rtems_status_code rtems_io_unregister_driver(
108 rtems_device_major_number major
109);
110
120 rtems_status_code rtems_io_register_name(
121 const char *device_name,
122 rtems_device_major_number major,
123 rtems_device_minor_number minor
124);
125
139 rtems_status_code rtems_io_initialize(
140 rtems_device_major_number major,
141 rtems_device_minor_number minor,
142 void *argument
143);
144
156 rtems_status_code rtems_io_open(
157 rtems_device_major_number major,
158 rtems_device_minor_number minor,
159 void *argument
160);
161
173 rtems_status_code rtems_io_close(
174 rtems_device_major_number major,
175 rtems_device_minor_number minor,
176 void *argument
177);
178
190 rtems_status_code rtems_io_read(
191 rtems_device_major_number major,
192 rtems_device_minor_number minor,
193 void *argument
194);
195
207 rtems_status_code rtems_io_write(
208 rtems_device_major_number major,
209 rtems_device_minor_number minor,
210 void *argument
211);
212
224 rtems_status_code rtems_io_control(
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;
239} rtems_driver_name_t;
240
244 rtems_status_code rtems_io_lookup_name(
245 const char *name,
246 rtems_driver_name_t *device_info
247) RTEMS_DEPRECATED;
248
249#ifdef __cplusplus
250}
251#endif
252
253#endif
254/* end of include file */
rtems_io_lookup_name
rtems_status_code rtems_io_lookup_name(const char *name, rtems_driver_name_t *device_info) RTEMS_DEPRECATED
Definition: ioman.c:49
rtems_io_register_name
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:30
rtems_io_read
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_io_unregister_driver
rtems_status_code rtems_io_unregister_driver(rtems_device_major_number major)
Unregister a driver from the device driver table.
Definition: iounregisterdriver.c:27
rtems_io_write
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
rtems_io_close
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_io_control
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_io_initialize
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_io_driver_io_error
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_io_register_driver
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_io_open
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
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
RTEMS_DEPRECATED
#define RTEMS_DEPRECATED
Public name for task floating point context area.
Definition: basedefs.h:141
status.h
rtems_driver_address_table
Definition: io.h:48
rtems_driver_name_t
Definition: io.h:234