aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/common/ARMCMx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-01 13:47:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-02-01 13:47:25 +0000
commitc02d5e76c506586b259425edddb1385677fe8e97 (patch)
tree7216c2c3ea9001545ce1b45b104871b459619af6 /os/hal/ports/common/ARMCMx
parentb73bb9c7a298337b5aadac6baa6b6f46868297ae (diff)
downloadChibiOS-c02d5e76c506586b259425edddb1385677fe8e97.tar.gz
ChibiOS-c02d5e76c506586b259425edddb1385677fe8e97.tar.bz2
ChibiOS-c02d5e76c506586b259425edddb1385677fe8e97.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6659 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/common/ARMCMx')
-rw-r--r--os/hal/ports/common/ARMCMx/nvic.c16
-rw-r--r--os/hal/ports/common/ARMCMx/nvic.h5
2 files changed, 4 insertions, 17 deletions
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