nrfx 2.5
Functions
MUTEX HAL

Hardware access layer for managing the MUTEX peripheral. More...

Functions

NRF_STATIC_INLINE bool nrf_mutex_lock (NRF_MUTEX_Type *p_reg, uint8_t mutex)
 Function for locking the specified mutex. More...
 
NRF_STATIC_INLINE void nrf_mutex_unlock (NRF_MUTEX_Type *p_reg, uint8_t mutex)
 Function for unlocking the specified mutex. More...
 

Detailed Description

Hardware access layer for managing the MUTEX peripheral.

Function Documentation

◆ nrf_mutex_lock()

NRF_STATIC_INLINE bool nrf_mutex_lock ( NRF_MUTEX_Type *  p_reg,
uint8_t  mutex 
)

Function for locking the specified mutex.

If the specified mutex is already locked, its state remains unchanged.

Note
Faults are not managed by the MUTEX peripheral. One consequence is that if a mutex is locked and a fault happens, it is the responsibility of the fault handler to release the mutex. If a fault handler is not managing the mutex release, the mutex will remain locked.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]mutexIndex of the mutex to be locked.
Return values
trueMutex is successfully locked.
falseMutex was already locked.

◆ nrf_mutex_unlock()

NRF_STATIC_INLINE void nrf_mutex_unlock ( NRF_MUTEX_Type *  p_reg,
uint8_t  mutex 
)

Function for unlocking the specified mutex.

If the specified mutex is already unlocked, its state remains unchanged.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]mutexIndex of the mutex to be locked.

Documentation feedback | Developer Zone | Subscribe | Updated