aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/rt/RT-STM32F303-DISCOVERY/keil/ch.uvproj7
-rw-r--r--os/hal/ports/common/ARMCMx/nvic.c16
-rw-r--r--os/hal/ports/common/ARMCMx/nvic.h5
3 files changed, 10 insertions, 18 deletions
diff --git a/demos/rt/RT-STM32F303-DISCOVERY/keil/ch.uvproj b/demos/rt/RT-STM32F303-DISCOVERY/keil/ch.uvproj
index d347210f1..02b0a5cd8 100644
--- a/demos/rt/RT-STM32F303-DISCOVERY/keil/ch.uvproj
+++ b/demos/rt/RT-STM32F303-DISCOVERY/keil/ch.uvproj
@@ -357,7 +357,7 @@
<MiscControls>--c99</MiscControls>
<Define>__heap_base__=Image$$RW_IRAM1$$ZI$$Limit __heap_end__=Image$$RW_RAM1$$Base</Define>
<Undefine></Undefine>
- <IncludePath>..\;..\..\..\..\os\common\ports\ARMCMx\devices\STM32F30x;..\..\..\..\os\ext\CMSIS\include;..\..\..\..\os\ext\CMSIS\ST;..\..\..\..\os\rt\ports\ARMCMx;..\..\..\..\os\rt\ports\ARMCMx\compilers\RVCT;..\..\..\..\os\rt\include;..\..\..\..\os\hal\osal\rt;..\..\..\..\os\hal\include;..\..\..\..\os\hal\boards\ST_STM32F3_DISCOVERY;..\..\..\..\os\hal\ports\common\ARMCMx;..\..\..\..\os\hal\ports\STM32\STM32F30x;..\..\..\..\os\hal\ports\STM32\LLD;..\..\..\..\os\hal\ports\STM32\LLD\GPIOv2;..\..\..\..\os\hal\ports\STM32\LLD\I2Cv2;..\..\..\..\os\hal\ports\STM32\LLD\RTCv2;..\..\..\..\os\hal\ports\STM32\LLD\SPIv2;..\..\..\..\os\hal\ports\STM32\LLD\TIMv1;..\..\..\..\os\hal\ports\STM32\LLD\USARTv2;..\..\..\..\os\hal\ports\STM32\LLD\USBv1</IncludePath>
+ <IncludePath>..\;..\..\..\..\os\common\ports\ARMCMx\devices\STM32F30x;..\..\..\..\os\ext\CMSIS\include;..\..\..\..\os\ext\CMSIS\ST;..\..\..\..\os\rt\ports\ARMCMx;..\..\..\..\os\rt\ports\ARMCMx\compilers\RVCT;..\..\..\..\os\rt\include;..\..\..\..\os\hal\osal\rt;..\..\..\..\os\hal\include;..\..\..\..\os\hal\boards\ST_STM32F3_DISCOVERY;..\..\..\..\os\hal\ports\common\ARMCMx;..\..\..\..\os\hal\ports\STM32\STM32F30x;..\..\..\..\os\hal\ports\STM32\LLD;..\..\..\..\os\hal\ports\STM32\LLD\GPIOv2;..\..\..\..\os\hal\ports\STM32\LLD\I2Cv2;..\..\..\..\os\hal\ports\STM32\LLD\RTCv2;..\..\..\..\os\hal\ports\STM32\LLD\SPIv2;..\..\..\..\os\hal\ports\STM32\LLD\TIMv1;..\..\..\..\os\hal\ports\STM32\LLD\USARTv2;..\..\..\..\os\hal\ports\STM32\LLD\USBv1;..\..\..\..\test</IncludePath>
</VariousControls>
</Cads>
<Aads>
@@ -908,6 +908,11 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\os\hal\ports\common\ARMCMx\nvic.c</FilePath>
</File>
+ <File>
+ <FileName>nvic.h</FileName>
+ <FileType>5</FileType>
+ <FilePath>..\..\..\..\os\hal\ports\common\ARMCMx\nvic.h</FilePath>
+ </File>
</Files>
</Group>
<Group>
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