diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-16 08:37:49 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-12 14:53:01 +0200 |
commit | 2ffb38ea3dc06d185659887ea79954353cffb1ab (patch) | |
tree | 7f9b799fa2d00cf93fcdcb9335e8ffca163178ae | |
parent | spec: Add interrupt manager extension (diff) | |
download | rtems-central-2ffb38ea3dc06d185659887ea79954353cffb1ab.tar.bz2 |
spec: Add interrupt vector directives
-rw-r--r-- | spec/c/if/false.yml | 2 | ||||
-rw-r--r-- | spec/c/if/true.yml | 2 | ||||
-rw-r--r-- | spec/rtems/intr/if/attributes.yml | 162 | ||||
-rw-r--r-- | spec/rtems/intr/if/cause-on.yml | 66 | ||||
-rw-r--r-- | spec/rtems/intr/if/cause.yml | 40 | ||||
-rw-r--r-- | spec/rtems/intr/if/clear.yml | 40 | ||||
-rw-r--r-- | spec/rtems/intr/if/get-attributes.yml | 58 | ||||
-rw-r--r-- | spec/rtems/intr/if/group.yml | 24 | ||||
-rw-r--r-- | spec/rtems/intr/if/is-pending.yml | 70 | ||||
-rw-r--r-- | spec/rtems/intr/if/signal-edge-falling.yml | 17 | ||||
-rw-r--r-- | spec/rtems/intr/if/signal-edge-raising.yml | 17 | ||||
-rw-r--r-- | spec/rtems/intr/if/signal-level-high.yml | 17 | ||||
-rw-r--r-- | spec/rtems/intr/if/signal-level-low.yml | 17 | ||||
-rw-r--r-- | spec/rtems/intr/if/signal-unspecified.yml | 17 | ||||
-rw-r--r-- | spec/rtems/intr/if/signal-variant.yml | 28 | ||||
-rw-r--r-- | spec/rtems/intr/if/vector-disable.yml | 59 | ||||
-rw-r--r-- | spec/rtems/intr/if/vector-enable.yml | 59 | ||||
-rw-r--r-- | spec/rtems/intr/if/vector-is-enabled.yml | 66 |
18 files changed, 737 insertions, 24 deletions
diff --git a/spec/c/if/false.yml b/spec/c/if/false.yml index 8531c1bb..1aefca7a 100644 --- a/spec/c/if/false.yml +++ b/spec/c/if/false.yml @@ -3,7 +3,7 @@ copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) enabled-by: true index-entries: [] -interface-type: unspecified +interface-type: unspecified-define links: - role: interface-placement uid: stdbool diff --git a/spec/c/if/true.yml b/spec/c/if/true.yml index 76b24ff9..c6eed7c0 100644 --- a/spec/c/if/true.yml +++ b/spec/c/if/true.yml @@ -3,7 +3,7 @@ copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) enabled-by: true index-entries: [] -interface-type: unspecified +interface-type: unspecified-define links: - role: interface-placement uid: stdbool diff --git a/spec/rtems/intr/if/attributes.yml b/spec/rtems/intr/if/attributes.yml new file mode 100644 index 00000000..193d589e --- /dev/null +++ b/spec/rtems/intr/if/attributes.yml @@ -0,0 +1,162 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This structure provides the attributes of an interrupt vector. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: +- default: + brief: | + This member is true, if the interrupt vector is maskable by + ${local-disable:/name}, otherwise it is false. + definition: bool ${.:name} + description: | + Interrupt vectors which are not maskable by ${local-disable:/name} should + be used with care since they cannot use most operating system services. + kind: member + name: is_maskable + variants: [] +- default: + brief: | + This member is true, if the interrupt vector is always enabled, otherwise + it is false. + definition: bool ${.:name} + description: | + For an always enabled interrupt vector it follows that it can be enabled + and that it cannot be disabled. + kind: member + name: always_enabled + variants: [] +- default: + brief: | + This member is true, if the interrupt vector can be enabled by + ${vector-enable:/name}, otherwise it is false. + definition: bool ${.:name} + description: | + When an interrupt vector can be enabled, this means that the enabled + state can always be changed from disabled to enabled and from enabled to + enabled. For an interrupt vector which can be enabled it follows that it + may be enabled. + kind: member + name: can_enable + variants: [] +- default: + brief: | + This member is true, if the interrupt vector may be enabled by + ${vector-enable:/name}, otherwise it is false. + definition: bool ${.:name} + description: | + When an interrupt vector may be enabled, this means that the enabled + state may be changed from disabled to enabled and from enabled to + enabled. The requested enabled state change should be checked by + ${vector-is-enabled:/name}. Some interrupt vectors may be optionally + avaialable and cannot be enabled on a particular + ${/glossary/target:/term}. + kind: member + name: maybe_enable + variants: [] +- default: + brief: | + This member is true, if the interrupt vector can be disabled by + ${vector-disable:/name}, otherwise it is false. + definition: bool ${.:name} + description: | + When an interrupt vector can be disabled, this means that the enabled + state can be changed from disabled to disabled and from enabled to + disabled. + kind: member + name: can_disable + variants: [] +- default: + brief: | + This member is true, if the interrupt vector can be caused by + ${cause:/name}, otherwise it is false. + definition: bool ${.:name} + description: null + kind: member + name: can_cause + variants: [] +- default: + brief: | + This member is true, if the interrupt vector can be caused on a processor + by ${cause-on:/name}, otherwise it is false. + definition: bool ${.:name} + description: null + kind: member + name: can_cause_on + variants: [] +- default: + brief: | + This member is true, if the interrupt vector can be cleared by + ${clear:/name}, otherwise it is false. + definition: bool ${.:name} + description: null + kind: member + name: can_clear + variants: [] +- default: + brief: | + This member is true, if the pending status of the interrupt associated + with the interrupt vector is cleared by an interrupt acknowledge from the + processor, otherwise it is false. + definition: bool ${.:name} + description: null + kind: member + name: cleared_by_acknowledge + variants: [] +- default: + brief: | + This member is true, if the affinity set of the interrupt vector can be + obtained by ${get-affinity:/name}, otherwise it is false. + definition: bool ${.:name} + description: null + kind: member + name: can_get_affinity + variants: [] +- default: + brief: | + This member is true, if the affinity set of the interrupt vector can be + set by ${set-affinity:/name}, otherwise it is false. + definition: bool ${.:name} + description: null + kind: member + name: can_set_affinity + variants: [] +- default: + brief: | + This member is true, if the interrupt associated with the interrupt + vector can be triggered by a message. + definition: bool ${.:name} + description: | + Interrupts may be also triggered by signals, ${cause:/name} or + ${cause-on:/name}. Examples for message triggered interrupts are the + PCIe MSI/MSI-X and the ARM GICv3 Locality-specific Peripheral Interrupts + (LPI). + kind: member + name: may_be_triggered_by_message + variants: [] +- default: + brief: | + This member describes the trigger signal of the interrupt associated with + the interrupt vector. + definition: ${signal-variant:/name} ${.:name} + description: | + Interrupts may be also triggered by messages, ${cause:/name} or + ${cause-on:/name}. + kind: member + name: trigger_signal + variants: [] +definition-kind: typedef-only +description: | + The ${get-attributes:/name} directive may be used to obtain the attributes of + an interrupt vector. +enabled-by: true +index-entries: [] +interface-type: struct +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +name: rtems_interrupt_attributes +notes: null +type: interface diff --git a/spec/rtems/intr/if/cause-on.yml b/spec/rtems/intr/if/cause-on.yml new file mode 100644 index 00000000..6aee24d2 --- /dev/null +++ b/spec/rtems/intr/if/cause-on.yml @@ -0,0 +1,66 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Causes the interrupt vector on the processor. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + - ${/c/if/uint32_t:/name} ${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +- role: constraint + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt +name: rtems_interrupt_cause_on +notes: | + The ${get-attributes:/name} directive may be used to check if an interrupt + vector can be caused on a processor. +params: +- description: | + is the number of the interrupt vector to cause. + dir: null + name: vector +- description: | + is the index of the target processor of the interrupt vector to cause. + dir: null + name: cpu_index +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} + - description: | + The processor specified by ${.:/params[1]/name} was not configured to be + used by the application. + value: ${../../status/if/not-configured:/name} + - description: | + The processor specified by ${.:/params[1]/name} was configured to be used + by the application, however, it was not online. + value: ${../../status/if/incorrect-state:/name} + - description: | + The request to cause the interrupt vector has not been satisfied. + value: ${../../status/if/unsatisfied:/name} +type: interface diff --git a/spec/rtems/intr/if/cause.yml b/spec/rtems/intr/if/cause.yml index 0ab332e8..e93835da 100644 --- a/spec/rtems/intr/if/cause.yml +++ b/spec/rtems/intr/if/cause.yml @@ -1,32 +1,54 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause brief: | - Causes the interrupt. + Causes the interrupt vector. copyrights: - Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) - Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) definition: - default: | - do { } while ( 0 ) + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + return: ${../../status/if/code:/name} variants: [] description: null enabled-by: true index-entries: [] -interface-type: macro +interface-type: function links: - role: interface-placement uid: header - role: interface-ingroup uid: group - role: constraint - uid: /constraint/no-impl + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt name: rtems_interrupt_cause -notes: null +notes: | + The ${get-attributes:/name} directive may be used to check if an interrupt + vector can be caused. params: - description: | - is the vector number of the interrupt to cause. + is the number of the interrupt vector to cause. dir: null - name: _vector + name: vector return: return: null - return-values: [] + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} + - description: | + The request to cause the interrupt vector has not been satisfied. + value: ${../../status/if/unsatisfied:/name} type: interface diff --git a/spec/rtems/intr/if/clear.yml b/spec/rtems/intr/if/clear.yml index f92bbede..c9730e7d 100644 --- a/spec/rtems/intr/if/clear.yml +++ b/spec/rtems/intr/if/clear.yml @@ -1,32 +1,54 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause brief: | - Clears the interrupt. + Clears the interrupt vector. copyrights: - Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) - Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) definition: - default: | - do { } while ( 0 ) + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + return: ${../../status/if/code:/name} variants: [] description: null enabled-by: true index-entries: [] -interface-type: macro +interface-type: function links: - role: interface-placement uid: header - role: interface-ingroup uid: group - role: constraint - uid: /constraint/no-impl + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt name: rtems_interrupt_clear -notes: null +notes: | + The ${get-attributes:/name} directive may be used to check if an interrupt + vector can be cleared. params: - description: | - is the vector number of the interrupt to clear. + is the number of the interrupt vector to clear. dir: null - name: _vector + name: vector return: return: null - return-values: [] + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} + - description: | + The request to cause the interrupt vector has not been satisfied. + value: ${../../status/if/unsatisfied:/name} type: interface diff --git a/spec/rtems/intr/if/get-attributes.yml b/spec/rtems/intr/if/get-attributes.yml new file mode 100644 index 00000000..3cb28b3e --- /dev/null +++ b/spec/rtems/intr/if/get-attributes.yml @@ -0,0 +1,58 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Gets the attributes of the interrupt vector. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + - ${attributes:/name} *${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +- role: constraint + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt +name: rtems_interrupt_get_attributes +notes: null +params: +- description: | + is the interrupt vector number. + dir: null + name: vector +- description: | + is the pointer to an ${attributes:/name} object. When the directive call + is successful, the attributes of the interrupt vector will be stored in + this object. + dir: out + name: attributes +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} +type: interface diff --git a/spec/rtems/intr/if/group.yml b/spec/rtems/intr/if/group.yml index 5a5e8c25..7bc0f387 100644 --- a/spec/rtems/intr/if/group.yml +++ b/spec/rtems/intr/if/group.yml @@ -34,10 +34,6 @@ links: - role: placement-order uid: is-in-progress - role: placement-order - uid: cause -- role: placement-order - uid: clear -- role: placement-order uid: lock-initialize - role: placement-order uid: lock-destroy @@ -78,10 +74,30 @@ links: - role: placement-order uid: handler-remove - role: placement-order + uid: vector-is-enabled +- role: placement-order + uid: vector-enable +- role: placement-order + uid: vector-disable +- role: placement-order + uid: is-pending +- role: placement-order + uid: cause +- role: placement-order + uid: cause-on +- role: placement-order + uid: clear +- role: placement-order uid: get-affinity - role: placement-order uid: set-affinity - role: placement-order + uid: signal-variant +- role: placement-order + uid: attributes +- role: placement-order + uid: get-attributes +- role: placement-order uid: handler-iterate - role: placement-order uid: server-default diff --git a/spec/rtems/intr/if/is-pending.yml b/spec/rtems/intr/if/is-pending.yml new file mode 100644 index 00000000..5ef1861d --- /dev/null +++ b/spec/rtems/intr/if/is-pending.yml @@ -0,0 +1,70 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Checks if the interrupt is pending. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + - bool *${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: | + The directive checks if the interrupt associated with the interrupt vector + specified by ${.:/params[0]/name} was pending for the processor executing the + directive call at some time point during the call. +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +- role: constraint + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt +name: rtems_interrupt_is_pending +notes: | + Interrupts may be made pending by calling the ${cause:/name} or + ${cause-on:/name} directives or due to exernal signals or messages. The + pending state may be cleared by ${clear:/name}. +params: +- description: | + is the interrupt vector number. + dir: null + name: vector +- description: | + is the pointer to a ``bool`` object. When the directive call is + successful, the pending status of the interrupt associated with the + interrupt vector specified by ${.:/params[0]/name} will be stored in this + object. When the interrupt was pending for the processor executing the + directive call at some time point during the call, the object value will be + set to ${/c/if/true:/name}, otherwise to ${/c/if/false:/name}. + dir: out + name: pending +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} + - description: | + The request to get the pending status has not been satisfied. + value: ${../../status/if/unsatisfied:/name} +type: interface diff --git a/spec/rtems/intr/if/signal-edge-falling.yml b/spec/rtems/intr/if/signal-edge-falling.yml new file mode 100644 index 00000000..afad914b --- /dev/null +++ b/spec/rtems/intr/if/signal-edge-falling.yml @@ -0,0 +1,17 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This interrupt signal variant indicates that the interrupt is triggered by a + falling edge signal. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: null + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: enumerator +links: [] +name: RTEMS_INTERRUPT_SIGNAL_EDGE_FALLING +notes: null +type: interface diff --git a/spec/rtems/intr/if/signal-edge-raising.yml b/spec/rtems/intr/if/signal-edge-raising.yml new file mode 100644 index 00000000..2943a07f --- /dev/null +++ b/spec/rtems/intr/if/signal-edge-raising.yml @@ -0,0 +1,17 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This interrupt signal variant indicates that the interrupt is triggered by a + raising edge signal. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: null + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: enumerator +links: [] +name: RTEMS_INTERRUPT_SIGNAL_EDGE_RAISING +notes: null +type: interface diff --git a/spec/rtems/intr/if/signal-level-high.yml b/spec/rtems/intr/if/signal-level-high.yml new file mode 100644 index 00000000..6b5f9041 --- /dev/null +++ b/spec/rtems/intr/if/signal-level-high.yml @@ -0,0 +1,17 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This interrupt signal variant indicates that the interrupt is triggered by a + high level signal. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: null + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: enumerator +links: [] +name: RTEMS_INTERRUPT_SIGNAL_LEVEL_HIGH +notes: null +type: interface diff --git a/spec/rtems/intr/if/signal-level-low.yml b/spec/rtems/intr/if/signal-level-low.yml new file mode 100644 index 00000000..a6fcc47c --- /dev/null +++ b/spec/rtems/intr/if/signal-level-low.yml @@ -0,0 +1,17 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This interrupt signal variant indicates that the interrupt is triggered by a + low level signal. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: null + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: enumerator +links: [] +name: RTEMS_INTERRUPT_SIGNAL_LEVEL_LOW +notes: null +type: interface diff --git a/spec/rtems/intr/if/signal-unspecified.yml b/spec/rtems/intr/if/signal-unspecified.yml new file mode 100644 index 00000000..2850d2e3 --- /dev/null +++ b/spec/rtems/intr/if/signal-unspecified.yml @@ -0,0 +1,17 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This interrupt signal variant indicates that the interrupt trigger signal is + unspecified. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: null + variants: [] +description: null +enabled-by: true +index-entries: [] +interface-type: enumerator +links: [] +name: RTEMS_INTERRUPT_SIGNAL_UNSPECIFIED +notes: null +type: interface diff --git a/spec/rtems/intr/if/signal-variant.yml b/spec/rtems/intr/if/signal-variant.yml new file mode 100644 index 00000000..eb30ea70 --- /dev/null +++ b/spec/rtems/intr/if/signal-variant.yml @@ -0,0 +1,28 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + This enumeration provides interrupt trigger signal variants. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition-kind: typedef-only +description: null +enabled-by: true +index-entries: [] +interface-type: enum +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +- role: interface-enumerator + uid: signal-unspecified +- role: interface-enumerator + uid: signal-level-low +- role: interface-enumerator + uid: signal-level-high +- role: interface-enumerator + uid: signal-edge-falling +- role: interface-enumerator + uid: signal-edge-raising +name: rtems_interrupt_signal_variant +notes: null +type: interface diff --git a/spec/rtems/intr/if/vector-disable.yml b/spec/rtems/intr/if/vector-disable.yml new file mode 100644 index 00000000..65284de0 --- /dev/null +++ b/spec/rtems/intr/if/vector-disable.yml @@ -0,0 +1,59 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Disables the interrupt vector. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + return: ${../../status/if/code:/name} + variants: [] +description: | + The directive disables the interrupt vector specified by + ${.:/params[0]/name}. This prevents that an interrupt service request is + issued to the target processors of the interrupt vector. +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +- role: constraint + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt +name: rtems_interrupt_vector_disable +notes: | + The ${get-attributes:/name} directive may be used to check if an interrupt + vector can be disabled. Interrupt vectors may be enabled by + ${vector-enable:/name}. There may be targets on which some interrupt vectors + cannot be disabled, for example a hardware watchdog interrupt or software + generated interrupts. +params: +- description: | + is the number of the interrupt vector to disable. + dir: null + name: vector +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} + - description: | + The request to disable the interrupt vector has not been satisfied. + value: ${../../status/if/unsatisfied:/name} +type: interface diff --git a/spec/rtems/intr/if/vector-enable.yml b/spec/rtems/intr/if/vector-enable.yml new file mode 100644 index 00000000..359a4ae2 --- /dev/null +++ b/spec/rtems/intr/if/vector-enable.yml @@ -0,0 +1,59 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Enables the interrupt vector. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + return: ${../../status/if/code:/name} + variants: [] +description: | + The directive enables the interrupt vector specified by ${.:/params[0]/name}. + This allows that interrupt service requests are issued to the target + processors of the interrupt vector. Interrupt service requests for an + interrupt vector may be caused by ${cause:/name}, ${cause-on:/name}, + external signals, or messages. +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +- role: constraint + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt +name: rtems_interrupt_vector_enable +notes: | + The ${get-attributes:/name} directive may be used to check if an interrupt + vector can be enabled. Interrupt vectors may be disabled by + ${vector-disable:/name}. +params: +- description: | + is the number of the interrupt vector to enable. + dir: null + name: vector +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} + - description: | + The request to enable the interrupt vector has not been satisfied. + value: ${../../status/if/unsatisfied:/name} +type: interface diff --git a/spec/rtems/intr/if/vector-is-enabled.yml b/spec/rtems/intr/if/vector-is-enabled.yml new file mode 100644 index 00000000..fd980cba --- /dev/null +++ b/spec/rtems/intr/if/vector-is-enabled.yml @@ -0,0 +1,66 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Checks if the interrupt vector is enabled. +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + attributes: null + body: null + params: + - ${vector-number:/name} ${.:/params[0]/name} + - bool *${.:/params[1]/name} + return: ${../../status/if/code:/name} + variants: [] +description: | + The directive checks if the interrupt associated with the interrupt vector + specified by ${.:/params[0]/name} was enabled for the processor executing the + directive call at some time point during the call. +enabled-by: true +index-entries: [] +interface-type: function +links: +- role: interface-placement + uid: header-2 +- role: interface-ingroup + uid: group +- role: constraint + uid: /constraint/directive-ctx-isr +- role: constraint + uid: /constraint/directive-ctx-devinit +- role: constraint + uid: /constraint/directive-ctx-task +- role: constraint + uid: /constraint/directive-no-preempt +name: rtems_interrupt_vector_is_enabled +notes: | + Interrupt vectors may be enabled by ${vector-enable:/name} and disabled by + ${vector-disable:/name}. +params: +- description: | + is the interrupt vector number. + dir: null + name: vector +- description: | + is the pointer to a ``bool`` object. When the directive call is + successful, the enabled status of the interrupt associated with the + interrupt vector specified by ${.:/params[0]/name} will be stored in this + object. When the interrupt was enabled for the processor executing the + directive call at some time point during the call, the object value will be + set to ${/c/if/true:/name}, otherwise to ${/c/if/false:/name}. + dir: out + name: enabled +return: + return: null + return-values: + - description: | + The requested operation was successful. + value: ${../../status/if/successful:/name} + - description: | + The ${.:/params[1]/name} parameter was ${/c/if/null:/name}. + value: ${../../status/if/invalid-address:/name} + - description: | + There was no interrupt vector associated with the number specified by + ${.:/params[0]/name}. + value: ${../../status/if/invalid-id:/name} +type: interface |