X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fdataflash.h;h=a60f30eaebd7858dfb0b0f1fc33e9efbf7b43166;hb=911d2706a86d326786bfe721dcc3d63aeade7f28;hp=1ad87ef4af6c9feb38c3000c1861b7fb3ffa6e33;hpb=8cca97771bf57082616dde340005874812fb728a;p=bertos.git diff --git a/bertos/drv/dataflash.h b/bertos/drv/dataflash.h index 1ad87ef4..a60f30ea 100644 --- a/bertos/drv/dataflash.h +++ b/bertos/drv/dataflash.h @@ -30,11 +30,16 @@ * * --> * - * \brief Function library for dataflash AT45DB family (interface). + * \brief Function library for dataflash AT45DB family. * - * \version $Id: dataflash.h 21658 2008-06-05 16:42:54Z asterix $ + * \version $Id$ * * \author Daniele Basile + * + * $WIZ$ module_name = "dataflash" + * $WIZ$ module_depends = "kfile" + * $WIZ$ module_configuration = "bertos/cfg/cfg_dataflash.h" + * $WIZ$ module_hw = "bertos/hw/hw_dataflash.h", "bertos/hw/hw_dataflash.c" */ @@ -43,7 +48,8 @@ #include -#include +#include +#include /** * Type definitions for dflash memory. @@ -100,7 +106,7 @@ typedef struct DataFlash /** * Convert + ASSERT from generic KFile to DataFlash. */ -INLINE DataFlash * DATAFLASHKFILE(KFile *fd) +INLINE DataFlash * DATAFLASH_CAST(KFile *fd) { ASSERT(fd->_type == KFT_DATAFLASH); return (DataFlash *)fd; @@ -182,6 +188,7 @@ typedef struct DataflashInfo bool dataflash_init(DataFlash *fd, KFile *ch, DataflashType type, dataflash_setCS_t *setCS, dataflash_setReset_t *setReset); +bool dataflash_diskInit(struct BattFsSuper *d, DataFlash *fd, pgcnt_t *page_array); /** * To test data falsh drive you could use @@ -190,7 +197,9 @@ bool dataflash_init(DataFlash *fd, KFile *ch, DataflashType type, dataflash_setC * * (see drv/datafalsh_test.c for more detail) */ -int dataflash_testSetUp(void); +int dataflash_testSetup(void); +/* For backward compatibility */ +#define dataflash_testSetUp() dataflash_testSetup() int dataflash_testRun(void); int dataflash_testTearDown(void);