1 | .. comment SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. COMMENT: COPYRIGHT(c) 2017. |
---|
4 | .. COMMENT: On-Line Applications Research Corporation(OAR). |
---|
5 | .. COMMENT: All rights reserved. |
---|
6 | |
---|
7 | Device Control |
---|
8 | ############## |
---|
9 | |
---|
10 | Introduction |
---|
11 | ============ |
---|
12 | |
---|
13 | The POSIX Device Control API is defined by POSIX 1003.26 and attempts |
---|
14 | to provides a portable alternative to the ioctl() service which is |
---|
15 | not standardized across POSIX implementations. Support for this |
---|
16 | standard is required by the Open Group's FACE Technical Standard |
---|
17 | :cits:"FACE:2012:FTS". Unfortunately, this part of the POSIX standard |
---|
18 | is not widely implemented. |
---|
19 | |
---|
20 | The services provided by the timer manager are: |
---|
21 | |
---|
22 | - posix_devctl_ - Control a Device |
---|
23 | |
---|
24 | Background |
---|
25 | ========== |
---|
26 | |
---|
27 | Operations |
---|
28 | ========== |
---|
29 | |
---|
30 | System Calls |
---|
31 | ============ |
---|
32 | |
---|
33 | This section details the POSIX device control's services. A subsection |
---|
34 | is dedicated to each of this manager's services and describes the calling |
---|
35 | sequence, related constants, usage, and status codes. |
---|
36 | |
---|
37 | .. COMMENT: posix_devctl |
---|
38 | |
---|
39 | .. _posix_devctl |
---|
40 | |
---|
41 | posix_devctl - Control a Device |
---|
42 | ------------------------------- |
---|
43 | |
---|
44 | **CALLING SEQUENCE:** |
---|
45 | |
---|
46 | .. code-block:: c |
---|
47 | |
---|
48 | #include <devctl.h> |
---|
49 | int posix_devctl( |
---|
50 | int fd, |
---|
51 | int dcmd, |
---|
52 | void *restrict dev_data_ptr, |
---|
53 | size_t nbyte, |
---|
54 | int *restrict dev_info_ptr |
---|
55 | ); |
---|
56 | |
---|
57 | **STATUS CODES:** |
---|
58 | |
---|
59 | The status codes returned reflect those returned by the ``ioctl()`` service |
---|
60 | and the underlying device drivers. |
---|
61 | |
---|
62 | **DESCRIPTION:** |
---|
63 | |
---|
64 | This method is intended to be a portable alternative to the ``ioctl()`` |
---|
65 | method. The RTEMS implementation follows what is referred to as a library |
---|
66 | implementation which is a simple wrapper for the ``ioctl()`` method. |
---|
67 | The fd, fcmd, dev_data_ptr, and nbyte parameters are passed unmodified |
---|
68 | to the ``ioctl()`` method. |
---|
69 | |
---|
70 | If the dev_info_ptr parameter is not NULL, then the location pointed |
---|
71 | to by dev_info_ptr is set to 0. |
---|
72 | |
---|
73 | **NOTES:** |
---|
74 | |
---|
75 | NONE |
---|