diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-04-30 15:54:02 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-04-30 15:54:02 -0600 |
commit | 45c144ba134835b0a66bdcb7dd40114c7b6a8249 (patch) | |
tree | 3ee75ed806c7f0de92d28b1bb00dd6d017fab0cf /apps/examples/nxffs/nxffs_main.c | |
parent | 8241609e9edbab8443fb4a3f278bfc7a924c05b1 (diff) | |
download | nuttx-45c144ba134835b0a66bdcb7dd40114c7b6a8249.tar.gz nuttx-45c144ba134835b0a66bdcb7dd40114c7b6a8249.tar.bz2 nuttx-45c144ba134835b0a66bdcb7dd40114c7b6a8249.zip |
Add configuration and example to test MTD partitions
Diffstat (limited to 'apps/examples/nxffs/nxffs_main.c')
-rw-r--r-- | apps/examples/nxffs/nxffs_main.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/examples/nxffs/nxffs_main.c b/apps/examples/nxffs/nxffs_main.c index 8bb5cd1fe..23b02cc16 100644 --- a/apps/examples/nxffs/nxffs_main.c +++ b/apps/examples/nxffs/nxffs_main.c @@ -69,10 +69,6 @@ /* This must exactly match the default configuration in drivers/mtd/rammtd.c */ -# ifndef CONFIG_RAMMTD_BLOCKSIZE -# define CONFIG_RAMMTD_BLOCKSIZE 512 -# endif - # ifndef CONFIG_RAMMTD_ERASESIZE # define CONFIG_RAMMTD_ERASESIZE 4096 # endif @@ -81,8 +77,7 @@ # define CONFIG_EXAMPLES_NXFFS_NEBLOCKS (32) # endif -# undef CONFIG_EXAMPLES_NXFFS_BUFSIZE -# define CONFIG_EXAMPLES_NXFFS_BUFSIZE \ +# define EXAMPLES_NXFFS_BUFSIZE \ (CONFIG_RAMMTD_ERASESIZE * CONFIG_EXAMPLES_NXFFS_NEBLOCKS) #endif @@ -145,7 +140,7 @@ struct nxffs_filedesc_s /* Pre-allocated simulated flash */ #ifndef CONFIG_EXAMPLES_NXFFS_ARCHINIT -static uint8_t g_simflash[CONFIG_EXAMPLES_NXFFS_BUFSIZE]; +static uint8_t g_simflash[EXAMPLES_NXFFS_BUFSIZE]; #endif static uint8_t g_fileimage[CONFIG_EXAMPLES_NXFFS_MAXFILE]; @@ -807,7 +802,7 @@ int nxffs_main(int argc, char *argv[]) #ifdef CONFIG_EXAMPLES_NXFFS_ARCHINIT mtd = nxffs_archinitialize(); #else - mtd = rammtd_initialize(g_simflash, CONFIG_EXAMPLES_NXFFS_BUFSIZE); + mtd = rammtd_initialize(g_simflash, EXAMPLES_NXFFS_BUFSIZE); #endif if (!mtd) { |