summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-11-09 08:33:57 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-11-10 08:55:38 +0100
commitd156d7b2f8c11c2ea6caa96ff10e50f1bd14013f (patch)
tree5975cdb8081d7a9a7dd8abb6b6cf379f687e2074
parentbsps/riscv: Improve bsp_interrupt_vector_disable() (diff)
downloadrtems-d156d7b2f8c11c2ea6caa96ff10e50f1bd14013f.tar.bz2
bsps/riscv: bsp_interrupt_get_attributes()
Implement this function.
-rw-r--r--bsps/riscv/riscv/irq/irq.c15
1 files changed, 15 insertions, 0 deletions
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;
}