MTD: Increase size of the geometry structure to support FLASH parts with 246KiB erase blocks

This commit is contained in:
Gregory Nutt 2015-05-26 06:46:09 -06:00
parent 06df839522
commit b1fa91a681

View File

@ -2,7 +2,7 @@
* include/nuttx/mtd/mtd.h
* Memory Technology Device (MTD) interface
*
* Copyright (C) 2009-2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2013, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -83,10 +83,11 @@
struct mtd_geometry_s
{
uint32_t blocksize :14; /* Size of one read/write block. Largest: 16KB-1 */
uint32_t erasesize :18; /* Size of one erase blocks -- must be a multiple
* of blocksize. Largest: 512KB-1 */
size_t neraseblocks; /* Number of erase blocks */
uint16_t blocksize; /* Size of one read/write block. */
/* Probably 16-bits wasted here for alignment */
uint32_t erasesize; /* Size of one erase blocks -- must be a multiple
* of blocksize.*/
uint32_t neraseblocks; /* Number of erase blocks */
};
/* The following defines the information for writing bytes to a sector