[rtems commit] bsps/arm: Fix ARMv7-M interrupt suppport
Sebastian Huber
sebh at rtems.org
Wed Jun 7 13:30:06 UTC 2017
Module: rtems
Branch: master
Commit: ce3ac00cfc9557797b11604158c3f4eb8859dcc6
Changeset: http://git.rtems.org/rtems/commit/?id=ce3ac00cfc9557797b11604158c3f4eb8859dcc6
Author: Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date: Tue Jun 6 15:41:48 2017 +0200
bsps/arm: Fix ARMv7-M interrupt suppport
Enable/disable vector routines now check for a valid vector. Without
these guards, the enable/disable vector routines will not work with the
interrupt server.
---
c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c b/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
index 6e80c16..df17c26 100644
--- a/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
+++ b/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
@@ -24,14 +24,18 @@
rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
{
- _ARMV7M_NVIC_Set_enable((int) vector);
+ if (bsp_interrupt_is_valid_vector(vector)) {
+ _ARMV7M_NVIC_Set_enable((int) vector);
+ }
return RTEMS_SUCCESSFUL;
}
rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
{
- _ARMV7M_NVIC_Clear_enable((int) vector);
+ if (bsp_interrupt_is_valid_vector(vector)) {
+ _ARMV7M_NVIC_Clear_enable((int) vector);
+ }
return RTEMS_SUCCESSFUL;
}
More information about the vc
mailing list