1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Operations on IMFS Device Nodes |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * COPYRIGHT (c) 1989-2012. |
---|
9 | * On-Line Applications Research Corporation (OAR). |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.com/license/LICENSE. |
---|
14 | */ |
---|
15 | |
---|
16 | #ifndef _RTEMS_DEVICEIO_H |
---|
17 | #define _RTEMS_DEVICEIO_H |
---|
18 | |
---|
19 | #include <rtems/libio.h> |
---|
20 | |
---|
21 | /** |
---|
22 | * @defgroup IMFSDevices IMFS Device IO Handler |
---|
23 | * |
---|
24 | * @ingroup IMFS |
---|
25 | * |
---|
26 | * This contains the interface to device drivers using the RTEMS Classic API. |
---|
27 | */ |
---|
28 | /**@{*/ |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif /* __cplusplus */ |
---|
33 | |
---|
34 | /** |
---|
35 | * @brief IMFS device node handlers. |
---|
36 | * |
---|
37 | * IMFS Device Node Handlers |
---|
38 | * |
---|
39 | * This file contains the set of handlers used to map operations on |
---|
40 | * IMFS device nodes onto calls to the RTEMS Classic API IO Manager. |
---|
41 | */ |
---|
42 | int rtems_deviceio_errno( rtems_status_code status ); |
---|
43 | |
---|
44 | int rtems_deviceio_open( |
---|
45 | rtems_libio_t *iop, |
---|
46 | const char *path, |
---|
47 | int oflag, |
---|
48 | mode_t mode, |
---|
49 | rtems_device_major_number major, |
---|
50 | rtems_device_minor_number minor |
---|
51 | ); |
---|
52 | |
---|
53 | int rtems_deviceio_close( |
---|
54 | rtems_libio_t *iop, |
---|
55 | rtems_device_major_number major, |
---|
56 | rtems_device_minor_number minor |
---|
57 | ); |
---|
58 | |
---|
59 | ssize_t rtems_deviceio_read( |
---|
60 | rtems_libio_t *iop, |
---|
61 | void *buf, |
---|
62 | size_t nbyte, |
---|
63 | rtems_device_major_number major, |
---|
64 | rtems_device_minor_number minor |
---|
65 | ); |
---|
66 | |
---|
67 | ssize_t rtems_deviceio_write( |
---|
68 | rtems_libio_t *iop, |
---|
69 | const void *buf, |
---|
70 | size_t nbyte, |
---|
71 | rtems_device_major_number major, |
---|
72 | rtems_device_minor_number minor |
---|
73 | ); |
---|
74 | |
---|
75 | int rtems_deviceio_control( |
---|
76 | rtems_libio_t *iop, |
---|
77 | ioctl_command_t command, |
---|
78 | void *buffer, |
---|
79 | rtems_device_major_number major, |
---|
80 | rtems_device_minor_number minor |
---|
81 | ); |
---|
82 | |
---|
83 | #ifdef __cplusplus |
---|
84 | } |
---|
85 | #endif |
---|
86 | /* __cplusplus */ |
---|
87 | |
---|
88 | /**@}*/ |
---|
89 | |
---|
90 | #endif /* _RTEMS_DEVICEIO_H */ |
---|