nRF Connect SDK API 0.1.0
|
int data_fifo_block_lock | ( | struct data_fifo * | data_fifo, |
void ** | data, | ||
size_t | size | ||
) |
#include <include/data_fifo.h>
Confirm that the memory block use has finished and the block is put into the message queue.
There is no mechanism blocking this region from being written to or read from. Hence, this block should not be used before it is later fetched by using data_fifo_pointer_last_filled_get.
data_fifo | Pointer to the data_fifo structure. |
data | Double pointer to the memory block that has been written to. |
size | Number of bytes written. Must be equal to or smaller than the block size max. |
0 | Block has been submitted to the message queue. |
-ENOMEM | The size parameter is larger than the block size max. |
-EINVAL | The supplied size is zero. |
-ESPIPE | A generic return value if an error occurs in k_msg_put. Since data has already been added to the slab, there must be space in the message queue. |