MTD device that is emulated in RAM for test purposes. More...
MTD device that is emulated in RAM for test purposes.
Helpers for using emulated MTDs.
Data Structures | |
struct | mtd_emulated_t |
Device descriptor for a MTD device that is emulated in RAM. More... | |
Macros | |
#define | MTD_EMULATED_DEV(n, sc, pps, ps) |
Macro to define an emulated MTD. | |
#define | MTD_EMULATED_DEV_FS(n, m, fs) VFS_AUTO_MOUNT(fs, VFS_MTD(mtd_emulated_dev ## n), "/mtde" # n, m) |
Macro to define an automatic VFS mount point for an emulated MTD. | |
Variables | |
const mtd_desc_t | _mtd_emulated_driver |
Emulated MTD device operations table for mtd. | |
#define MTD_EMULATED_DEV | ( | n, | |
sc, | |||
pps, | |||
ps | |||
) |
Macro to define an emulated MTD.
This macro creates a MTD device that is emulated in RAM. For example, using
creates the emulated MTD device mtd_emulated_dev0
with 16 sectors, 4 pages per sector and a page size of 64 bytes. The write size is always 1 byte.
n | index of the emulated MTD (results into symbol mtd_emulated_dev<n> ) |
sc | sectors of the emulated MTD |
pps | pages per sector of the emulated MTD |
ps | page size in bytes |
Definition at line 50 of file mtd_emulated.h.
#define MTD_EMULATED_DEV_FS | ( | n, | |
m, | |||
fs | |||
) | VFS_AUTO_MOUNT(fs, VFS_MTD(mtd_emulated_dev ## n), "/mtde" # n, m) |
Macro to define an automatic VFS mount point for an emulated MTD.
For example, using
automatically mounts the emulated MTD mtd_emulated_dev0
with FAT file system under mount point /mtde0
with unique index 2.
n | index of the emulated MTD (symbol mtd_emulated_dev<n> , mount point /mtde0 ) |
m | unique overall index of VFS mount point |
fs | filesystem type used |
Definition at line 83 of file mtd_emulated.h.