From c02d5e76c506586b259425edddb1385677fe8e97 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 1 Feb 2014 13:47:25 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6659 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/common/ARMCMx/nvic.c | 16 ++-------------- os/hal/ports/common/ARMCMx/nvic.h | 5 ++--- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'os') diff --git a/os/hal/ports/common/ARMCMx/nvic.c b/os/hal/ports/common/ARMCMx/nvic.c index c45366396..20bf60035 100644 --- a/os/hal/ports/common/ARMCMx/nvic.c +++ b/os/hal/ports/common/ARMCMx/nvic.c @@ -55,7 +55,7 @@ * @param[in] n the interrupt number * @param[in] prio the interrupt priority mask */ -void nvicEnableVector(IRQn_Type n, uint32_t prio) { +void nvicEnableVector(uint32_t n, uint32_t prio) { NVIC->IP[n] = NVIC_PRIORITY_MASK(prio); NVIC->ICPR[n >> 5] = 1 << (n & 0x1F); @@ -68,22 +68,10 @@ void nvicEnableVector(IRQn_Type n, uint32_t prio) { * * @param[in] n the interrupt number */ -void nvicDisableVector(IRQn_Type n) { +void nvicDisableVector(uint32_t n) { NVIC->ICER[n >> 5] = 1 << (n & 0x1F); NVIC->IP[n] = 0; } -/** - * @brief Changes the priority of a system handler. - * @note The parameters are not tested for correctness. - * - * @param[in] handler the system handler number - * @param[in] prio the system handler priority mask - */ -void nvicSetSystemHandlerPriority(IRQn_Type handler, uint32_t prio) { - - SCB->SHP[((uint32_t)(handler) & 15) - 4] = NVIC_PRIORITY_MASK(prio); -} - /** @} */ diff --git a/os/hal/ports/common/ARMCMx/nvic.h b/os/hal/ports/common/ARMCMx/nvic.h index 82fde801c..b9fa905b1 100644 --- a/os/hal/ports/common/ARMCMx/nvic.h +++ b/os/hal/ports/common/ARMCMx/nvic.h @@ -57,9 +57,8 @@ #ifdef __cplusplus extern "C" { #endif - void nvicEnableVector(IRQn_Type n, uint32_t prio); - void nvicDisableVector(IRQn_Type n); - void nvicSetSystemHandlerPriority(IRQn_Type handler, uint32_t prio); + void nvicEnableVector(uint32_t n, uint32_t prio); + void nvicDisableVector(uint32_t n); #ifdef __cplusplus } #endif -- cgit v1.2.3