[PATCH 05/10] bsps/riscv: bsp_interrupt_get_attributes()

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Nov 9 16:09:15 UTC 2022


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;
 }
 
-- 
2.35.3



More information about the devel mailing list