RTEMS 6.2
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
flash_sim_flashdev.c File Reference

Flashdev backend simulating NAND in memory. More...

#include <dev/flash/flash_sim_flashdev.h>
#include <rtems/rtems/clock.h>
#include <rtems/score/basedefs.h>
#include <stdlib.h>
#include <string.h>

Data Structures

struct  nand_priv_data
 Struct allocating memory space for flash regions. Used by rtems_flashdev to store region allocations. More...
 

Macros

#define NAND_SIM_FLASH_MAX_REGIONS   ( (size_t) 32 )
 

Typedefs

typedef struct nand_priv_data nand_priv_data
 Struct allocating memory space for flash regions. Used by rtems_flashdev to store region allocations.
 

Functions

rtems_flashdevflash_sim_flashdev_init (struct flash_sim_flashdev_attributes *attr)
 Initializes a simulated flash device. The flash device is not registered in this call. The returned object must be destroyed with rtems_flashdev_destroy if it has not been registered.
 

Detailed Description

Flashdev backend simulating NAND in memory.

Function Documentation

◆ flash_sim_flashdev_init()

rtems_flashdev * flash_sim_flashdev_init ( struct flash_sim_flashdev_attributes attr)

Initializes a simulated flash device. The flash device is not registered in this call. The returned object must be destroyed with rtems_flashdev_destroy if it has not been registered.

Parameters
[in]attrA pointer to a flash_sim_flashdev_attributes describing the features of the simulated flash. This parameter may be NULL.
Return values
Apointer to the rtems_flashdev.
NULLon failure.