Empty implementation

nRF5 SDK v12.2.0

Data Structures

struct nrf_block_dev_empty_work_t
Work structure of EMPTY block device. More...
struct nrf_block_dev_empty_config_t
EMPTY block device config. More...
struct nrf_block_dev_empty_t
EMPTY block device. More...

Macros

#define NRF_BLOCK_DEV_EMPTY_CONFIG (blk_size, blk_count)
EMPTY block device config initializer ( nrf_block_dev_empty_config_t ) More...
#define NRF_BLOCK_DEV_EMPTY_DEFINE (name, config, info)
Defines a EMPTY block device. More...

Functions

static nrf_block_dev_t const * nrf_block_dev_empty_ops_get ( nrf_block_dev_empty_t const *p_blk_empty)
Returns block device API handle from EMPTY block device. More...

Variables

const nrf_block_dev_ops_t nrf_block_device_empty_ops
EMPTY block device operations.

Detailed Description

This module implements block device API. It works like:

  • /dev/empty for write operations
  • /dev/zero for read operations

Macro Definition Documentation

#define NRF_BLOCK_DEV_EMPTY_CONFIG ( blk_size,
blk_count
)
Value:
{ \
.block_size = (blk_size), \
.block_count = (blk_count) \
}

EMPTY block device config initializer ( nrf_block_dev_empty_config_t )

Parameters
blk_size Block size
blk_count Block count
#define NRF_BLOCK_DEV_EMPTY_DEFINE ( name,
config,
info
)
Value:
static const nrf_block_dev_empty_t name = { \
.info_strings = BRACKET_EXTRACT (info), \
.empty_config = config, \
.p_work = & CONCAT_2 (name, _work), \
}

Defines a EMPTY block device.

Parameters
name Instance name
config Configuration nrf_block_dev_empty_config_t
info Info strings NFR_BLOCK_DEV_INFO_CONFIG

Function Documentation

static nrf_block_dev_t const* nrf_block_dev_empty_ops_get ( nrf_block_dev_empty_t const * p_blk_empty )
inline static

Returns block device API handle from EMPTY block device.

Parameters
[in] p_blk_empty EMPTY block device
Returns
Block device handle