Bluetooth: Controller: Use CMSIS NVIC APIs directly

Convert driver to use the CMSIS NVIC APIs rather than the internal
ones so we can remove them in the future.

Change-Id: Ib9fe696e8d5e55f60865d3fd958a035135ce517a
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-01-13 10:40:36 -06:00
commit 8d4c1787bf
3 changed files with 10 additions and 6 deletions

View file

@ -7,6 +7,7 @@
#include <string.h>
#include <soc.h>
#include <arch/arm/cortex_m/cmsis.h>
#include "mem.h"
@ -76,7 +77,7 @@ uint32_t ecb_encrypt_nonblocking(struct ecb *ecb)
NRF_ECB->INTENSET = ECB_INTENSET_ERRORECB_Msk | ECB_INTENSET_ENDECB_Msk;
/* enable interrupt */
_NvicIrqUnpend(ECB_IRQn);
NVIC_ClearPendingIRQ(ECB_IRQn);
irq_enable(ECB_IRQn);
/* start the encryption h/w */

View file

@ -5,6 +5,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <soc.h>
#include <arch/arm/cortex_m/cmsis.h>
#include "util.h"
#include "mem.h"
@ -46,7 +47,7 @@ void radio_isr_set(radio_isr_fp fp_radio_isr)
*/
);
_NvicIrqUnpend(RADIO_IRQn);
NVIC_ClearPendingIRQ(RADIO_IRQn);
irq_enable(RADIO_IRQn);
}
@ -488,7 +489,7 @@ void *radio_ccm_tx_pkt_set(struct ccm *ccm, void *pkt)
__WFE();
}
NRF_CCM->INTENCLR = CCM_INTENCLR_ENDCRYPT_Msk;
_NvicIrqUnpend(CCM_AAR_IRQn);
NVIC_ClearPendingIRQ(CCM_AAR_IRQn);
LL_ASSERT(NRF_CCM->EVENTS_ERROR == 0);
#else
@ -508,7 +509,7 @@ uint32_t radio_ccm_is_done(void)
__WFE();
}
NRF_CCM->INTENCLR = CCM_INTENCLR_ENDCRYPT_Msk;
_NvicIrqUnpend(CCM_AAR_IRQn);
NVIC_ClearPendingIRQ(CCM_AAR_IRQn);
return (NRF_CCM->EVENTS_ERROR == 0);
}

View file

@ -29,6 +29,8 @@
#include <drivers/clock_control/nrf5_clock_control.h>
#endif
#include <arch/arm/cortex_m/cmsis.h>
#include "util/config.h"
#include "util/mayfly.h"
#include "util/util.h"
@ -125,11 +127,11 @@ void mayfly_pend(uint8_t caller_id, uint8_t callee_id)
switch (callee_id) {
case MAYFLY_CALL_ID_0:
_NvicIrqPend(RTC0_IRQn);
NVIC_SetPendingIRQ(RTC0_IRQn);
break;
case MAYFLY_CALL_ID_1:
_NvicIrqPend(SWI4_IRQn);
NVIC_SetPendingIRQ(SWI4_IRQn);
break;
case MAYFLY_CALL_ID_PROGRAM: