SoftDevice NVIC public functions

S112 SoftDevice v7.2.0 API

Functions

__STATIC_INLINE uint32_t sd_nvic_EnableIRQ (IRQn_Type IRQn)
Enable External Interrupt. More...
__STATIC_INLINE uint32_t sd_nvic_DisableIRQ (IRQn_Type IRQn)
Disable External Interrupt. More...
__STATIC_INLINE uint32_t sd_nvic_GetPendingIRQ (IRQn_Type IRQn, uint32_t *p_pending_irq)
Get Pending Interrupt. More...
__STATIC_INLINE uint32_t sd_nvic_SetPendingIRQ (IRQn_Type IRQn)
Set Pending Interrupt. More...
__STATIC_INLINE uint32_t sd_nvic_ClearPendingIRQ (IRQn_Type IRQn)
Clear Pending Interrupt. More...
__STATIC_INLINE uint32_t sd_nvic_SetPriority (IRQn_Type IRQn, uint32_t priority)
Set Interrupt Priority. More...
__STATIC_INLINE uint32_t sd_nvic_GetPriority (IRQn_Type IRQn, uint32_t *p_priority)
Get Interrupt Priority. More...
__STATIC_INLINE uint32_t sd_nvic_SystemReset (void)
System Reset. More...
__STATIC_INLINE uint32_t sd_nvic_critical_region_enter (uint8_t *p_is_nested_critical_region)
Enter critical region. More...
__STATIC_INLINE uint32_t sd_nvic_critical_region_exit (uint8_t is_nested_critical_region)
Exit critical region. More...

Detailed Description

Function Documentation

__STATIC_INLINE uint32_t sd_nvic_ClearPendingIRQ ( IRQn_Type IRQn )

Clear Pending Interrupt.

Note
Corresponds to NVIC_ClearPendingIRQ in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_ClearPendingIRQ documentation in CMSIS.
Return values
NRF_SUCCESS The interrupt pending flag is cleared.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
__STATIC_INLINE uint32_t sd_nvic_critical_region_enter ( uint8_t * p_is_nested_critical_region )

Enter critical region.

Postcondition
Application interrupts will be disabled.
Note
sd_nvic_critical_region_enter() and sd_nvic_critical_region_exit() must be called in matching pairs inside each execution context
See Also
sd_nvic_critical_region_exit
Parameters
[out] p_is_nested_critical_region If 1, the application is now in a nested critical region.
Return values
__STATIC_INLINE uint32_t sd_nvic_critical_region_exit ( uint8_t is_nested_critical_region )

Exit critical region.

Precondition
Application has entered a critical region using sd_nvic_critical_region_enter .
Postcondition
If not in a nested critical region, the application interrupts will restored to the state before sd_nvic_critical_region_enter was called.
Parameters
[in] is_nested_critical_region If this is set to 1, the critical region won't be exited.
See Also
sd_nvic_critical_region_enter .
Return values
__STATIC_INLINE uint32_t sd_nvic_DisableIRQ ( IRQn_Type IRQn )

Disable External Interrupt.

Note
Corresponds to NVIC_DisableIRQ in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_DisableIRQ documentation in CMSIS.
Return values
NRF_SUCCESS The interrupt was disabled.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application.
__STATIC_INLINE uint32_t sd_nvic_EnableIRQ ( IRQn_Type IRQn )

Enable External Interrupt.

Note
Corresponds to NVIC_EnableIRQ in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_EnableIRQ documentation in CMSIS.
Return values
NRF_SUCCESS The interrupt was enabled.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE The interrupt is not available for the application.
NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt has a priority not available for the application.
__STATIC_INLINE uint32_t sd_nvic_GetPendingIRQ ( IRQn_Type IRQn ,
uint32_t * p_pending_irq
)

Get Pending Interrupt.

Note
Corresponds to NVIC_GetPendingIRQ in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_GetPendingIRQ documentation in CMSIS.
[out] p_pending_irq Return value from NVIC_GetPendingIRQ.
Return values
NRF_SUCCESS The interrupt is available for the application.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
__STATIC_INLINE uint32_t sd_nvic_GetPriority ( IRQn_Type IRQn ,
uint32_t * p_priority
)

Get Interrupt Priority.

Note
Corresponds to NVIC_GetPriority in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_GetPriority documentation in CMSIS.
[out] p_priority Return value from NVIC_GetPriority.
Return values
NRF_SUCCESS The interrupt priority is returned in p_priority.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE - IRQn is not available for the application.
__STATIC_INLINE uint32_t sd_nvic_SetPendingIRQ ( IRQn_Type IRQn )

Set Pending Interrupt.

Note
Corresponds to NVIC_SetPendingIRQ in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_SetPendingIRQ documentation in CMSIS.
Return values
NRF_SUCCESS The interrupt is set pending.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
__STATIC_INLINE uint32_t sd_nvic_SetPriority ( IRQn_Type IRQn ,
uint32_t priority
)

Set Interrupt Priority.

Note
Corresponds to NVIC_SetPriority in CMSIS.
Precondition
IRQn is valid and not reserved by the stack.
Priority is valid and not reserved by the stack.
Parameters
[in] IRQn See the NVIC_SetPriority documentation in CMSIS.
[in] priority A valid IRQ priority for use by the application.
Return values
NRF_SUCCESS The interrupt and priority level is available for the application.
NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE IRQn is not available for the application.
NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED The interrupt priority is not available for the application.
__STATIC_INLINE uint32_t sd_nvic_SystemReset ( void )

System Reset.

Note
Corresponds to NVIC_SystemReset in CMSIS.
Return values