diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-24 17:35:16 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-24 17:35:16 +0000 |
commit | 9aa229270fa7eb834950b6648bbe077fc8fecb62 (patch) | |
tree | 5a875a7d8cbdcf777ade0ed9e1675e8cbea135b1 /nuttx/include | |
parent | efd389f792aff35cb90b8b85b21eb5f7ff45fc63 (diff) | |
download | px4-nuttx-9aa229270fa7eb834950b6648bbe077fc8fecb62.tar.gz px4-nuttx-9aa229270fa7eb834950b6648bbe077fc8fecb62.tar.bz2 px4-nuttx-9aa229270fa7eb834950b6648bbe077fc8fecb62.zip |
Add a RAM-based MTD device
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3532 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/mtd.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/nuttx/include/nuttx/mtd.h b/nuttx/include/nuttx/mtd.h index d9beb082c..2cf56a2b4 100644 --- a/nuttx/include/nuttx/mtd.h +++ b/nuttx/include/nuttx/mtd.h @@ -138,11 +138,30 @@ extern "C" { * Description: * Initialize to provide a block driver wrapper around an MTD interface * + * Input Parameters: + * minor - The minor device number. The MTD block device will be + * registered as as /dev/mtdblockN where N is the minor number. + * mtd - The MTD device that supports the FLASH interface. + * ****************************************************************************/ -EXTERN int ftl_initialize(int minor, uint8_t *buffer, FAR struct mtd_dev_s *mtd); +EXTERN int ftl_initialize(int minor, FAR struct mtd_dev_s *mtd); -/************************************************************************************ +/**************************************************************************** + * Name: rammtd_initialize + * + * Description: + * Create and initialize a RAM MTD device instance. + * + * Input Parameters: + * start - Address of the beginning of the allocated RAM regions. + * size - The size in bytes of the allocated RAM region. + * + ****************************************************************************/ + +EXTERN FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size); + +/**************************************************************************** * Name: m25p_initialize * * Description: @@ -150,11 +169,11 @@ EXTERN int ftl_initialize(int minor, uint8_t *buffer, FAR struct mtd_dev_s *mtd) * in the file system, but are created as instances that can be bound to * other functions (such as a block or character driver front end). * - ************************************************************************************/ + ****************************************************************************/ EXTERN FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev); -/************************************************************************************ +/**************************************************************************** * Name: at45db_initialize * * Description: @@ -162,7 +181,7 @@ EXTERN FAR struct mtd_dev_s *m25p_initialize(FAR struct spi_dev_s *dev); * in the file system, but are created as instances that can be bound to * other functions (such as a block or character driver front end). * - ************************************************************************************/ + ****************************************************************************/ EXTERN FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *dev); |