git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6659 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2014-02-01 13:47:25 +00:00
parent b73bb9c7a2
commit c02d5e76c5
3 changed files with 10 additions and 18 deletions

View File

@ -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>

View File

@ -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);
}
/** @} */

View File

@ -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