nRF5 SDK v17.1.0
Modules | Data Structures | Macros | Functions | Variables
RAM implementation

This module implements block device API. It should be used as a reference block device. More...

Modules

 RAM block device configuration
 

Data Structures

struct  nrf_block_dev_ram_work_t
 Work structure of RAM block device. More...
 
struct  nrf_block_dev_ram_config_t
 Ram block device config. More...
 
struct  nrf_block_dev_ram_t
 Ram block device. More...
 

Macros

#define NRF_BLOCK_DEV_RAM_LOG_NAME   block_dev_ram
 Name of the module used for logger messaging.
 
#define NRF_BLOCK_DEV_RAM_CONFIG(blk_size, buffer, buffer_size)
 RAM block device config initializer (nrf_block_dev_ram_config_t) More...
 
#define NRF_BLOCK_DEV_RAM_DEFINE(name, config, info)
 Defines a RAM block device. More...
 

Functions

static nrf_block_dev_t const * nrf_block_dev_ram_ops_get (nrf_block_dev_ram_t const *p_blk_ram)
 Returns block device API handle from RAM block device. More...
 

Variables

const nrf_block_dev_ops_t nrf_block_device_ram_ops
 RAM block device operations.
 

Detailed Description

This module implements block device API. It should be used as a reference block device.

Macro Definition Documentation

#define NRF_BLOCK_DEV_RAM_CONFIG (   blk_size,
  buffer,
  buffer_size 
)
Value:
{ \
.block_size = (blk_size), \
.p_work_buffer = (buffer), \
.size = (buffer_size), \
}

RAM block device config initializer (nrf_block_dev_ram_config_t)

Parameters
blk_sizeBlock size
bufferRAM work buffer
buffer_sizeRAM work buffer size
#define NRF_BLOCK_DEV_RAM_DEFINE (   name,
  config,
  info 
)
Value:
static nrf_block_dev_ram_work_t CONCAT_2(name, _work); \
NRF_LOG_INSTANCE_REGISTER(NRF_BLOCK_DEV_RAM_LOG_NAME, name, \
NRF_BLOCK_DEV_RAM_CONFIG_LOG_LEVEL : NRF_LOG_SEVERITY_NONE); \
static const nrf_block_dev_ram_t name = { \
.block_dev = { .p_ops = &nrf_block_device_ram_ops }, \
.info_strings = BRACKET_EXTRACT(info), \
.ram_config = config, \
.p_work = &CONCAT_2(name, _work), \
NRF_LOG_INSTANCE_PTR_INIT(p_log, NRF_BLOCK_DEV_RAM_LOG_NAME, name) \
}

Defines a RAM block device.

Parameters
nameInstance name
configConfiguration nrf_block_dev_ram_config_t
infoInfo strings NFR_BLOCK_DEV_INFO_CONFIG

Function Documentation

static nrf_block_dev_t const* nrf_block_dev_ram_ops_get ( nrf_block_dev_ram_t const *  p_blk_ram)
inlinestatic

Returns block device API handle from RAM block device.

Parameters
[in]p_blk_ramRam block device
Returns
Block device handle

Documentation feedback | Developer Zone | Subscribe | Updated