1 | SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause |
---|
2 | brief: | |
---|
3 | Creates a timer. |
---|
4 | copyrights: |
---|
5 | - Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de) |
---|
6 | - Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) |
---|
7 | definition: |
---|
8 | default: |
---|
9 | attributes: null |
---|
10 | body: null |
---|
11 | params: |
---|
12 | - ${../../type/if/name:/name} ${.:/params[0]/name} |
---|
13 | - ${../../type/if/id:/name} *${.:/params[1]/name} |
---|
14 | return: ${../../status/if/code:/name} |
---|
15 | variants: [] |
---|
16 | description: | |
---|
17 | This directive creates a timer which resides on the local node. The timer |
---|
18 | has the user-defined object name specified in ${.:/params[0]/name}. The |
---|
19 | assigned object identifier is returned in ${.:/params[1]/name}. This |
---|
20 | identifier is used to access the timer with other timer related directives. |
---|
21 | enabled-by: true |
---|
22 | index-entries: |
---|
23 | - create a timer |
---|
24 | interface-type: function |
---|
25 | links: |
---|
26 | - role: interface-placement |
---|
27 | uid: header |
---|
28 | - role: interface-ingroup |
---|
29 | uid: group |
---|
30 | - role: constraint |
---|
31 | uid: /constraint/directive-ctx-devinit |
---|
32 | - role: constraint |
---|
33 | uid: /constraint/directive-ctx-task |
---|
34 | - role: constraint |
---|
35 | uid: /constraint/object-allocator |
---|
36 | - role: constraint |
---|
37 | uid: ../constraint/max |
---|
38 | - role: constraint |
---|
39 | uid: /constraint/obj-unlimited-alloc |
---|
40 | name: rtems_timer_create |
---|
41 | notes: | |
---|
42 | The processor used to maintain the timer is the processor of the calling task |
---|
43 | at some point during the timer creation. |
---|
44 | |
---|
45 | For control and maintenance of the timer, RTEMS allocates a |
---|
46 | ${/glossary/tmcb:/term} from the local TMCB free pool and initializes it. |
---|
47 | params: |
---|
48 | - description: | |
---|
49 | is the object name of the timer. |
---|
50 | dir: null |
---|
51 | name: name |
---|
52 | - description: | |
---|
53 | is the pointer to an ${../../type/if/id:/name} object. When the directive |
---|
54 | call is successful, the identifier of the created timer will be stored in |
---|
55 | this object. |
---|
56 | dir: out |
---|
57 | name: id |
---|
58 | return: |
---|
59 | return: null |
---|
60 | return-values: |
---|
61 | - description: | |
---|
62 | The requested operation was successful. |
---|
63 | value: ${../../status/if/successful:/name} |
---|
64 | - description: | |
---|
65 | The ${.:/params[0]/name} parameter was invalid. |
---|
66 | value: ${../../status/if/invalid-name:/name} |
---|
67 | - description: | |
---|
68 | The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. |
---|
69 | value: ${../../status/if/invalid-address:/name} |
---|
70 | - description: | |
---|
71 | There was no inactive object available to create a timer. The number of |
---|
72 | timers available to the application is configured through the |
---|
73 | ${/acfg/if/max-timers:/name} application configuration option. |
---|
74 | value: ${../../status/if/too-many:/name} |
---|
75 | type: interface |
---|