mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
drivers/mtd: add MTD null driver support
- fix memory leak during RAM MTD initialization - fix calculations for FILE MTD device with customized block and erase sizes Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
59786bf208
commit
e71b66c792
@@ -671,6 +671,22 @@ void filemtd_teardown(FAR struct mtd_dev_s *dev);
|
||||
|
||||
bool filemtd_isfilemtd(FAR struct mtd_dev_s *mtd);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nullmtd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Create and initialize a MTD null device instance.
|
||||
*
|
||||
* Input Parameters:
|
||||
* mtdlen - Total length of a size in bytes of the MTD null device
|
||||
* sectsize - Sector size of the MTD null device
|
||||
* erasesize - Erase block size of the MTD null device
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct mtd_dev_s *nullmtd_initialize(size_t mtdlen, int16_t sectsize,
|
||||
int32_t erasesize);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user