RTEMS
6.1-rc4
Loading...
Searching...
No Matches
cpukit
include
rtems
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
50
extern
"C"
{
51
#endif
/* __cplusplus */
52
61
int
rtems_deviceio_open
(
62
rtems_libio_t
*iop,
63
const
char
*path,
64
int
oflag,
65
mode_t mode,
66
rtems_device_major_number
major,
67
rtems_device_minor_number
minor
68
);
69
70
int
rtems_deviceio_close(
71
rtems_libio_t
*iop,
72
rtems_device_major_number
major,
73
rtems_device_minor_number
minor
74
);
75
76
ssize_t rtems_deviceio_read(
77
rtems_libio_t
*iop,
78
void
*buf,
79
size_t
nbyte,
80
rtems_device_major_number
major,
81
rtems_device_minor_number
minor
82
);
83
84
ssize_t rtems_deviceio_write(
85
rtems_libio_t
*iop,
86
const
void
*buf,
87
size_t
nbyte,
88
rtems_device_major_number
major,
89
rtems_device_minor_number
minor
90
);
91
92
int
rtems_deviceio_control(
93
rtems_libio_t
*iop,
94
ioctl_command_t command,
95
void
*buffer,
96
rtems_device_major_number
major,
97
rtems_device_minor_number
minor
98
);
99
100
#ifdef __cplusplus
101
}
102
#endif
103
/* __cplusplus */
104
107
#endif
/* _RTEMS_DEVICEIO_H */
rtems_deviceio_open
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
rtems_device_major_number
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition:
io.h:103
rtems_device_minor_number
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition:
io.h:115
libio.h
Basic IO API.
rtems_libio_tt
An open file data structure.
Definition:
libio.h:1338
Generated by
1.9.6