nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ data_fifo_pointer_first_vacant_get()

int data_fifo_pointer_first_vacant_get ( struct data_fifo data_fifo,
void **  data,
k_timeout_t  timeout 
)

#include <include/data_fifo.h>

Get pointer to the first vacant block in slab.

Gives pointer to the first vacant memory block in the slab.

Parameters
data_fifoPointer to the data_fifo structure.
dataDouble pointer to the memory area. If this function returns with success, the caller is now able to write to this memory block. The write operation must not exceed the block size max given to DATA_FIFO_DEFINE.
timeoutNon-negative waiting period to wait for operation to complete (in milliseconds). Use K_NO_WAIT to return without waiting, or K_FOREVER to wait as long as necessary.
Return values
0Memory allocated.
valueReturn values from k_mem_slab_alloc.