You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/07/18 16:32:40 UTC

[GitHub] utzig closed pull request #1281: Add SVC IRQ name to mcu.h to avoid naming issues

utzig closed pull request #1281: Add SVC IRQ name to mcu.h to avoid naming issues
URL: https://github.com/apache/mynewt-core/pull/1281
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/mcu/nordic/nrf51xxx/include/mcu/mcu.h b/hw/mcu/nordic/nrf51xxx/include/mcu/mcu.h
index 2bf6ee0816..c854b229a3 100644
--- a/hw/mcu/nordic/nrf51xxx/include/mcu/mcu.h
+++ b/hw/mcu/nordic/nrf51xxx/include/mcu/mcu.h
@@ -24,6 +24,8 @@
 extern "C" {
 #endif
 
+#define SVC_IRQ_NUMBER SVCall_IRQn
+
 /*
  * Defines for naming GPIOs.
  */
diff --git a/hw/mcu/nxp/mkw41z/include/mcu/mcu.h b/hw/mcu/nxp/mkw41z/include/mcu/mcu.h
index 7451c57e81..65b3cad951 100644
--- a/hw/mcu/nxp/mkw41z/include/mcu/mcu.h
+++ b/hw/mcu/nxp/mkw41z/include/mcu/mcu.h
@@ -24,6 +24,8 @@
 extern "C" {
 #endif
 
+#define SVC_IRQ_NUMBER SVCall_IRQn
+
 /*
  * Defines for naming GPIOs.
  */
diff --git a/kernel/os/src/arch/cortex_m0/os_arch_arm.c b/kernel/os/src/arch/cortex_m0/os_arch_arm.c
index f18e8274e0..cd8515f9bf 100644
--- a/kernel/os/src/arch/cortex_m0/os_arch_arm.c
+++ b/kernel/os/src/arch/cortex_m0/os_arch_arm.c
@@ -22,6 +22,8 @@
 #include <hal/hal_os_tick.h>
 #include <mcu/cmsis_nvic.h>
 
+#include "mcu/mcu.h"
+
 #include "os_priv.h"
 
 /*
@@ -199,7 +201,7 @@ os_arch_os_init(void)
             NVIC->IP[i] = -1;
         }
 
-        NVIC_SetVector(SVCall_IRQn, (uint32_t)SVC_Handler);
+        NVIC_SetVector(SVC_IRQ_NUMBER, (uint32_t)SVC_Handler);
         NVIC_SetVector(PendSV_IRQn, (uint32_t)PendSV_Handler);
         NVIC_SetVector(SysTick_IRQn, (uint32_t)SysTick_Handler);
 
@@ -219,7 +221,7 @@ os_arch_os_init(void)
         NVIC_SetPriority(PendSV_IRQn, PEND_SV_PRIO);
 
         /* Set the SVC interrupt to priority 0 (highest configurable) */
-        NVIC_SetPriority(SVCall_IRQn, SVC_PRIO);
+        NVIC_SetPriority(SVC_IRQ_NUMBER, SVC_PRIO);
 
         /* Check if privileged or not */
         if ((__get_CONTROL() & 1) == 0) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services