summaryrefslogtreecommitdiffstats
path: root/spec/rtems/io/if/open.yml
blob: c0b33275a9072f1d4d57720219ca186a5ac51bfb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
brief: |
  Opens the device specified by the device major and minor numbers.
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
- Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
definition:
  default:
    attributes: null
    body: null
    params:
    - ${device-major-number:/name} ${.:/params[0]/name}
    - ${device-minor-number:/name} ${.:/params[1]/name}
    - void *${.:/params[2]/name}
    return: ${../../status/if/code:/name}
  variants: []
description: |
  This directive calls the device driver open entry registered in the Device
  Driver Table for the specified device major number.
enabled-by: true
index-entries:
- open a device
interface-type: function
links:
- role: interface-placement
  uid: header
- role: interface-ingroup
  uid: group
- role: constraint
  uid: /constraint/directive-not-pre-qualified
name: rtems_io_open
notes: |
  The open entry point is commonly used by device drivers to provide exclusive
  access to a device.
params:
- description: |
    is the major number of the device.
  dir: null
  name: major
- description: |
    is the minor number of the device.
  dir: null
  name: minor
- description: |
    is the argument passed to the device driver close entry.
  dir: null
  name: argument
return:
  return: |
    Other status codes may be returned by the device driver open entry.
  return-values:
  - description: |
      The requested operation was successful.
    value: ${../../status/if/successful:/name}
  - description: |
      The device major number was invalid.
    value: ${../../status/if/invalid-number:/name}
type: interface