diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-09-25 10:41:47 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-09-25 10:41:47 -0600 |
commit | e5b660c8703aeb38b313f50c3218e64090793d21 (patch) | |
tree | 2d026962189e3d3862919af1b973fa310e81e669 /apps/examples/mtdrwb | |
parent | 4b2f435c8e191e11b496cf3162261edf6ec8c2f2 (diff) | |
download | nuttx-e5b660c8703aeb38b313f50c3218e64090793d21.tar.gz nuttx-e5b660c8703aeb38b313f50c3218e64090793d21.tar.bz2 nuttx-e5b660c8703aeb38b313f50c3218e64090793d21.zip |
A few fixes for clean apps/examples/mtdrwb build
Diffstat (limited to 'apps/examples/mtdrwb')
-rw-r--r-- | apps/examples/mtdrwb/mtdrwb_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/examples/mtdrwb/mtdrwb_main.c b/apps/examples/mtdrwb/mtdrwb_main.c index 73b097303..2a71c05db 100644 --- a/apps/examples/mtdrwb/mtdrwb_main.c +++ b/apps/examples/mtdrwb/mtdrwb_main.c @@ -240,6 +240,12 @@ int mtdrwb_main(int argc, char *argv[]) message(" erasesize: %lu\n", (unsigned long)geo.erasesize); message(" neraseblocks: %lu\n", (unsigned long)geo.neraseblocks); + blkpererase = geo.erasesize / geo.blocksize; + message(" blkpererase: %u\n", blkpererase); + + nblocks = geo.neraseblocks * blkpererase; + message(" nblocks: %lu\n", (unsigned long)nblocks); + /* Allocate a buffer */ buffer = (FAR uint32_t *)malloc(geo.blocksize); |