RTEMS 6.1-rc7
Loading...
Searching...
No Matches
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 & Co. KG
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 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/io/if/header */
55
56#ifndef _RTEMS_IO_H
57#define _RTEMS_IO_H
58
59#include <stdint.h>
60#include <rtems/rtems/status.h>
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/* Generated from spec:/rtems/io/if/group */
67
78/* Generated from spec:/rtems/io/if/device-driver */
79
91
92/* Generated from spec:/rtems/io/if/device-major-number */
93
104
105/* Generated from spec:/rtems/io/if/device-minor-number */
106
116
117/* Generated from spec:/rtems/io/if/device-driver-entry */
118
127 void *
128);
129
130/* Generated from spec:/rtems/io/if/driver-address-table */
131
140typedef struct {
147
154
161
168
175
183
184/* Generated from spec:/rtems/io/if/register-driver */
185
234 const rtems_driver_address_table *driver_table,
235 rtems_device_major_number *registered_major
236);
237
238/* Generated from spec:/rtems/io/if/unregister-driver */
239
260);
261
262/* Generated from spec:/rtems/io/if/initialize */
263
301 void *argument
302);
303
304/* Generated from spec:/rtems/io/if/register-name */
305
327 const char *device_name,
330);
331
332/* Generated from spec:/rtems/io/if/open */
333
361 void *argument
362);
363
364/* Generated from spec:/rtems/io/if/close */
365
393 void *argument
394);
395
396/* Generated from spec:/rtems/io/if/read */
397
427 void *argument
428);
429
430/* Generated from spec:/rtems/io/if/write */
431
459 void *argument
460);
461
462/* Generated from spec:/rtems/io/if/control */
463
496 void *argument
497);
498
499#ifdef __cplusplus
500}
501#endif
502
503#endif /* _RTEMS_IO_H */
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...
Definition: ioman.c:49
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.
Definition: ioread.c:43
rtems_status_code rtems_device_driver
This type shall be used in device driver entry declarations and definitions.
Definition: io.h:90
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:124
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.
Definition: iounregisterdriver.c:47
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.
Definition: iowrite.c:43
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.
Definition: ioclose.c:45
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.
Definition: iocontrol.c:43
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.
Definition: ioinitialize.c:43
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:103
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 ...
Definition: ioregisterdriver.c:84
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:115
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.
Definition: ioopen.c:43
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
This header file provides the status codes of Classic API directives and support functions.
This structure contains the device driver entries.
Definition: io.h:140
rtems_device_driver_entry write_entry
This member is the device driver write entry.
Definition: io.h:174
rtems_device_driver_entry initialization_entry
This member is the device driver initialization entry.
Definition: io.h:146
rtems_device_driver_entry control_entry
This member is the device driver control entry.
Definition: io.h:181
rtems_device_driver_entry open_entry
This member is the device driver open entry.
Definition: io.h:153
rtems_device_driver_entry read_entry
This member is the device driver read entry.
Definition: io.h:167
rtems_device_driver_entry close_entry
This member is the device driver close entry.
Definition: io.h:160