summaryrefslogtreecommitdiffstats
path: root/spec/rtems/io/if/register-driver.yml
blob: 9ca2ff82577d6c2186f2ea2865ad5d64770e4fde (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
brief: |
  Registers and initializes the device with the specified device driver address
  table and device major number in the Device Driver Table.
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}
    - const ${driver-address-table:/name} *${.:/params[1]/name}
    - ${device-major-number:/name} *${.:/params[2]/name}
    return: ${../../status/if/code:/name}
  variants: []
description: null
enabled-by: true
index-entries:
- register a device driver
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_register_driver
notes: |
  If the device major number equals zero a device major number will be
  obtained.  The device major number of the registered driver will be returned.

  After a successful registration, the ${initialize:/name} directive will be
  called to initialize the device.
params:
- description: |
    is the device major number.  Use a value of zero to let the system obtain a
    device major number automatically.
  dir: null
  name: major
- description: |
    is the device driver address table.
  dir: null
  name: driver_table
- description: |
    is the pointer to an ${device-major-number:/name} object.  When the
    directive call is successful, the device major number of the registered
    device will be stored in this object.
  dir: out
  name: registered_major
return:
  return: |
    Other status codes may be returned by ${initialize:/name}.
  return-values:
  - description: |
      The requested operation was successful.
    value: ${../../status/if/successful:/name}
  - description: |
      The device major number of the device was ${/c/if/null:/name}.
    value: ${../../status/if/invalid-address:/name}
  - description: |
      The device driver address table was empty.
    value: ${../../status/if/invalid-address:/name}
  - description: |
      The device major number of the device was out of range, see
      ${/acfg/if/max-drivers:/name}.
    value: ${../../status/if/invalid-number:/name}
  - description: |
      The system was unable to obtain a device major number.
    value: ${../../status/if/too-many:/name}
  - description: |
      The device major number was already in use.
    value: ${../../status/if/resource-in-use:/name}
  - description: |
      The directive was called from interrupt context.
    value: ${../../status/if/called-from-isr:/name}
type: interface