RTEMS 6.1-rc2
Loading...
Searching...
No Matches
deviceio.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
9/*
10 * COPYRIGHT (c) 1989-2012.
11 * On-Line Applications Research Corporation (OAR).
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#ifndef _RTEMS_DEVICEIO_H
36#define _RTEMS_DEVICEIO_H
37
38#include <rtems/libio.h>
39
49#ifdef __cplusplus
50extern "C" {
51#endif /* __cplusplus */
52
62 rtems_libio_t *iop,
63 const char *path,
64 int oflag,
65 mode_t mode,
68);
69
70int rtems_deviceio_close(
71 rtems_libio_t *iop,
74);
75
76ssize_t rtems_deviceio_read(
77 rtems_libio_t *iop,
78 void *buf,
79 size_t nbyte,
82);
83
84ssize_t rtems_deviceio_write(
85 rtems_libio_t *iop,
86 const void *buf,
87 size_t nbyte,
90);
91
92int rtems_deviceio_control(
93 rtems_libio_t *iop,
94 ioctl_command_t command,
95 void *buffer,
98);
99
100#ifdef __cplusplus
101}
102#endif
103/* __cplusplus */
104
107#endif /* _RTEMS_DEVICEIO_H */
int rtems_deviceio_open(rtems_libio_t *iop, const char *path, int oflag, mode_t mode, rtems_device_major_number major, rtems_device_minor_number minor)
IMFS device node handlers.
Definition: sup_fs_deviceio.c:43
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:103
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:115
Basic IO API.
An open file data structure.
Definition: libio.h:1338