Add FTL logic

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2307 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-12-06 00:19:50 +00:00
parent b585cbbcd4
commit bea1cb5e0e
7 changed files with 578 additions and 7 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ struct mtd_geometry_s
uint16 blocksize; /* Size of one read/write block */
uint16 erasesize; /* Size of one erase blocks -- must be a multiple
* of blocksize. */
size_t neraseblocks; /* Number of erase blocks */
size_t neraseblocks; /* Number of erase blocks */
};
/* This structure defines the interface to a simple memory technology device.
@@ -83,7 +83,7 @@ struct mtd_dev_s
{
/* The following methods operate on the MTD: */
/* Erase the specified erase blocks */
/* Erase the specified erase blocks (units are erase blocks) */
int (*erase)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks);
+1 -1
View File
@@ -106,7 +106,7 @@ struct rwbuffer_s
uint16 blocksize; /* The size of one block */
size_t nblocks; /* The total number blocks supported */
void *dev; /* Device state passed to callout functions */
FAR void *dev; /* Device state passed to callout functions */
/* Write buffer setup. If CONFIG_FS_WRITEBUFFER is defined, but you
* want read-ahead-only operation, (1) set wrmaxblocks to zero and do