[rtems commit] bsps/riscv: bsp_interrupt_get_attributes()
Sebastian Huber
sebh at rtems.org
Thu Nov 10 07:44:05 UTC 2022
Module: rtems
Branch: master
Commit: d156d7b2f8c11c2ea6caa96ff10e50f1bd14013f
Changeset: http://git.rtems.org/rtems/commit/?id=d156d7b2f8c11c2ea6caa96ff10e50f1bd14013f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Nov 9 08:33:57 2022 +0100
bsps/riscv: bsp_interrupt_get_attributes()
Implement this function.
---
bsps/riscv/riscv/irq/irq.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
index 238cb7f62a..a48ba2346c 100644
--- a/bsps/riscv/riscv/irq/irq.c
+++ b/bsps/riscv/riscv/irq/irq.c
@@ -294,6 +294,21 @@ rtems_status_code bsp_interrupt_get_attributes(
rtems_interrupt_attributes *attributes
)
{
+ attributes->is_maskable = true;
+ attributes->can_enable = true;
+ attributes->maybe_enable = true;
+ attributes->can_disable = true;
+ attributes->maybe_disable = true;
+ attributes->can_raise = (vector == RISCV_INTERRUPT_VECTOR_SOFTWARE);
+ attributes->can_raise_on = attributes->can_raise;
+ attributes->cleared_by_acknowledge = true;
+ attributes->can_get_affinity = RISCV_INTERRUPT_VECTOR_IS_EXTERNAL(vector);
+ attributes->can_set_affinity = attributes->can_get_affinity;
+
+ if (vector == RISCV_INTERRUPT_VECTOR_SOFTWARE) {
+ attributes->trigger_signal = RTEMS_INTERRUPT_NO_SIGNAL;
+ }
+
return RTEMS_SUCCESSFUL;
}
More information about the vc
mailing list