nRF5 SDK v17.1.0
Typedefs | Functions

Typedefs

typedef volatile uint32_t mutex_t
 

Functions

void hal_mutex_init (mutex_t *p_mutex)
 Configures mutex lock before first usage. More...
 
void hal_mutex_lock (mutex_t *p_mutex)
 Atomically sets mutex. If set is failed, enters spin lock loop. More...
 
void hal_mutex_unlock (mutex_t *p_mutex)
 Atomically clears mutex. Every other thread, spinning at this lock may try to lock it afterwards. More...
 

Detailed Description

NRF52 implementation is void and PC implementation is identical to atomic.

Function Documentation

void hal_mutex_init ( mutex_t *  p_mutex)

Configures mutex lock before first usage.

Parameters
[in,out]p_mutexpointer to mutex variable.
void hal_mutex_lock ( mutex_t *  p_mutex)

Atomically sets mutex. If set is failed, enters spin lock loop.

Parameters
[in]p_mutexpointer to mutex variable.
void hal_mutex_unlock ( mutex_t *  p_mutex)

Atomically clears mutex. Every other thread, spinning at this lock may try to lock it afterwards.

Parameters
[in]p_mutexpointer to mutex variable.

Documentation feedback | Developer Zone | Subscribe | Updated