RTEMS
io.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/io/if/header */
52 
53 #ifndef _RTEMS_IO_H
54 #define _RTEMS_IO_H
55 
56 #include <stdint.h>
57 #include <rtems/rtems/status.h>
58 
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 
63 /* Generated from spec:/rtems/io/if/group */
64 
75 /* Generated from spec:/rtems/io/if/device-minor-number */
76 
84 typedef uint32_t rtems_device_minor_number;
85 
86 /* Generated from spec:/rtems/io/if/device-major-number */
87 
96 typedef uint32_t rtems_device_major_number;
97 
98 /* Generated from spec:/rtems/io/if/device-driver */
99 
110 
111 /* Generated from spec:/rtems/io/if/device-driver-entry */
112 
121  void *
122 );
123 
124 /* Generated from spec:/rtems/io/if/driver-address-table */
125 
134 typedef struct {
141 
148 
155 
162 
169 
177 
178 /* Generated from spec:/rtems/io/if/close */
179 
206  void *argument
207 );
208 
209 /* Generated from spec:/rtems/io/if/control */
210 
242  void *argument
243 );
244 
245 /* Generated from spec:/rtems/io/if/initialize */
246 
281  void *argument
282 );
283 
284 /* Generated from spec:/rtems/io/if/open */
285 
312  void *argument
313 );
314 
315 /* Generated from spec:/rtems/io/if/read */
316 
345  void *argument
346 );
347 
348 /* Generated from spec:/rtems/io/if/register-driver */
349 
394  const rtems_driver_address_table *driver_table,
395  rtems_device_major_number *registered_major
396 );
397 
398 /* Generated from spec:/rtems/io/if/register-name */
399 
420  const char *device_name,
423 );
424 
425 /* Generated from spec:/rtems/io/if/unregister-driver */
426 
446 );
447 
448 /* Generated from spec:/rtems/io/if/write */
449 
476  void *argument
477 );
478 
479 #ifdef __cplusplus
480 }
481 #endif
482 
483 #endif /* _RTEMS_IO_H */
rtems_status_code rtems_device_driver
This type shall be used in device driver entry declarations and definitions.
Definition: io.h:109
rtems_status_code rtems_io_read(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Reads from the device specified by the device major and minor numbers.
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:96
rtems_status_code rtems_io_register_name(const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor)
Registers the device specified by the device major and minor numbers in the file system under the spe...
rtems_status_code rtems_io_unregister_driver(rtems_device_major_number major)
Removes a device driver specified by the device major number from the Device Driver Table...
This header file defines the status codes and support functions of the Classic API.
This structure contains the device driver entries.
Definition: io.h:134
rtems_device_driver(* rtems_device_driver_entry)(rtems_device_major_number, rtems_device_minor_number, void *)
Device driver entries shall have this type.
Definition: io.h:118
rtems_device_driver_entry initialization_entry
This member is the device driver initialization entry.
Definition: io.h:140
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 specified device driver address table and device major ...
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
rtems_device_driver_entry close_entry
This member is the device driver close entry.
Definition: io.h:154
rtems_status_code rtems_io_write(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Writes to the device specified by the device major and minor numbers.
rtems_status_code rtems_io_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Initializes the device specified by the device major and minor numbers.
rtems_status_code rtems_io_close(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Closes the device specified by the device major and minor numbers.
rtems_status_code rtems_io_open(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Opens the device specified by the device major and minor numbers.
rtems_status_code rtems_io_control(rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
Controls the device specified by the device major and minor numbers.
rtems_device_driver_entry open_entry
This member is the device driver open entry.
Definition: io.h:147
rtems_device_driver_entry control_entry
This member is the device driver control entry.
Definition: io.h:175
rtems_device_driver_entry write_entry
This member is the device driver write entry.
Definition: io.h:168
rtems_device_driver_entry read_entry
This member is the device driver read entry.
Definition: io.h:161
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:84