nRF5 SDK v17.1.0
Modules | Functions
Peripheral Resource Sharing (PRS)

Peripheral Resource Sharing interface (PRS). More...

Modules

 Peripheral Resource Sharing module configuration
 

Functions

nrfx_err_t nrfx_prs_acquire (void const *p_base_addr, nrfx_irq_handler_t irq_handler)
 Function for acquiring shared peripheral resources associated with the specified peripheral. More...
 
void nrfx_prs_release (void const *p_base_addr)
 Function for releasing shared resources reserved previously by nrfx_prs_acquire() for the specified peripheral. More...
 

Detailed Description

Peripheral Resource Sharing interface (PRS).

Function Documentation

nrfx_err_t nrfx_prs_acquire ( void const *  p_base_addr,
nrfx_irq_handler_t  irq_handler 
)

Function for acquiring shared peripheral resources associated with the specified peripheral.

Certain resources and registers are shared among peripherals that have the same ID (for example: SPI0, SPIM0, SPIS0, TWI0, TWIM0, and TWIS0 in nRF52832). Only one of them can be utilized at a given time. This function reserves proper resources to be used by the specified peripheral. If NRFX_PRS_ENABLED is set to a non-zero value, IRQ handlers for peripherals that are sharing resources with others are implemented by the Peripheral Resource Sharing (PRS) module instead of individual drivers. The drivers must then specify their interrupt handling routines and register them by using this function.

Parameters
[in]p_base_addrRequested peripheral base pointer.
[in]irq_handlerInterrupt handler to register.
Return values
NRFX_SUCCESSIf resources were acquired successfully or the specified peripheral is not handled by the PRS subsystem and there is no need to acquire resources for it.
NRFX_ERROR_BUSYIf resources were already acquired.
void nrfx_prs_release ( void const *  p_base_addr)

Function for releasing shared resources reserved previously by nrfx_prs_acquire() for the specified peripheral.

Parameters
[in]p_base_addrReleased peripheral base pointer.

Documentation feedback | Developer Zone | Subscribe | Updated