Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

RTIO CQE Flags. More...

Macros

#define RTIO_CQE_FLAG_MEMPOOL_BUFFER   BIT(0)
 The entry's buffer was allocated from the RTIO's mempool.
 
#define RTIO_CQE_FLAG_GET(flags)   FIELD_GET(GENMASK(7, 0), (flags))
 
#define RTIO_CQE_FLAG_MEMPOOL_GET_BLK_IDX(flags)   FIELD_GET(GENMASK(19, 8), (flags))
 Get the block index of a mempool flags.
 
#define RTIO_CQE_FLAG_MEMPOOL_GET_BLK_CNT(flags)   FIELD_GET(GENMASK(31, 20), (flags))
 Get the block count of a mempool flags.
 
#define RTIO_CQE_FLAG_PREP_MEMPOOL(blk_idx, blk_cnt)
 Prepare CQE flags for a mempool read.
 

Detailed Description

RTIO CQE Flags.

Macro Definition Documentation

◆ RTIO_CQE_FLAG_GET

#define RTIO_CQE_FLAG_GET (   flags)    FIELD_GET(GENMASK(7, 0), (flags))

#include <zephyr/rtio/rtio.h>

◆ RTIO_CQE_FLAG_MEMPOOL_BUFFER

#define RTIO_CQE_FLAG_MEMPOOL_BUFFER   BIT(0)

#include <zephyr/rtio/rtio.h>

The entry's buffer was allocated from the RTIO's mempool.

If this bit is set, the buffer was allocated from the memory pool and should be recycled as soon as the application is done with it.

◆ RTIO_CQE_FLAG_MEMPOOL_GET_BLK_CNT

#define RTIO_CQE_FLAG_MEMPOOL_GET_BLK_CNT (   flags)    FIELD_GET(GENMASK(31, 20), (flags))

#include <zephyr/rtio/rtio.h>

Get the block count of a mempool flags.

Parameters
flagsThe CQE flags value
Returns
The block count portion of the flags field.

◆ RTIO_CQE_FLAG_MEMPOOL_GET_BLK_IDX

#define RTIO_CQE_FLAG_MEMPOOL_GET_BLK_IDX (   flags)    FIELD_GET(GENMASK(19, 8), (flags))

#include <zephyr/rtio/rtio.h>

Get the block index of a mempool flags.

Parameters
flagsThe CQE flags value
Returns
The block index portion of the flags field.

◆ RTIO_CQE_FLAG_PREP_MEMPOOL

#define RTIO_CQE_FLAG_PREP_MEMPOOL (   blk_idx,
  blk_cnt 
)

#include <zephyr/rtio/rtio.h>

Value:
FIELD_PREP(GENMASK(19, 8), blk_idx) | FIELD_PREP(GENMASK(31, 20), blk_cnt))
#define RTIO_CQE_FLAG_MEMPOOL_BUFFER
The entry's buffer was allocated from the RTIO's mempool.
Definition: rtio.h:160
#define GENMASK(h, l)
Create a contiguous bitmask starting at bit position l and ending at position h.
Definition: util.h:70
#define FIELD_PREP(mask, value)
Prepare a bitfield element using value with mask representing its field position and width.
Definition: util.h:94

Prepare CQE flags for a mempool read.

Parameters
blk_idxThe mempool block index
blk_cntThe mempool block count
Returns
A shifted and masked value that can be added to the flags field with an OR operator.